Gets a web page based on the request url. {@code null} i no such page is found.

@return WebPage a web page mapping to the request
@throws WebException if anything goes wrong
546237
public function getPage() {
    $page = $this->traverse($this->pageMap, Server::getRequestUriParts());
    if ($page === null) {
      return null;
    }
    return $this->createWebPageFromClassName($page);
  }
52124
public String getURL(Class<? extends WebPage> clazz, Object param) throws IOException, SQLException {
		WebPage page=WebPage.getWebPage(sourcePage.getServletContext(), clazz, param);
		return getURL(page, param);
	}
373312
public DataUrl build() throws NullPointerException {
        if (data == null) {
            throw new NullPointerException("data is null!");
        } else if (encoding == null) {
            throw new NullPointerException("encoding is null!");
        }
        return new DataUrl(data, encoding, mimeType, headers);
    }
446039
public int doEndTag() throws JspException
    {
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
        HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
        ServletContext context = pageContext.getServletContext();

        try {
            boolean encoded = false;
            UrlConfig urlConfig = ConfigUtil.getConfig().getUrlConfig();
            if (urlConfig != null) {
                encoded = !urlConfig.isUrlEncodeUrls();
            }

            FreezableMutableURI uri = new FreezableMutableURI();
            uri.setEncoding(response.getCharacterEncoding());
            uri.setURI(url, encoded);
            boolean needsToBeSecure = false;
            if (_params != null) {
                uri.addParameters(_params, false );
            }
            if (!uri.isAbsolute() && PageFlowUtils.needsToBeSecure(context, request, url, true)) {
                needsToBeSecure = true;
            }

            URLRewriterService.rewriteURL(context, request, response, uri, URLType.ACTION, needsToBeSecure);
            String key = PageFlowUtils.getURLTemplateKey(URLType.ACTION, needsToBeSecure);
            boolean forXML = TagRenderingBase.Factory.isXHTML(request);
            URIContext uriContext = URIContextFactory.getInstance(forXML);
            String uriString = URLRewriterService.getTemplatedURL(context, request, uri, key, uriContext);
            write(response.encodeURL(uriString));
        }
        catch (URISyntaxException e) {
            // report the error...
            String s = Bundle.getString("Tags_RewriteURL_URLException",
                    new Object[]{url, e.getMessage()});
            registerTagError(s, e);
            reportErrors();
        }

        localRelease();
        return EVAL_PAGE;
    }
642790
public function get()
    {
        $uri = null;
        if ($this->context) {
            $uri = $this->context->getBaseUri() . '/';
        }
        $uri .= $this->params['endpoint'];
        
        $uri .= sprintf("?page=%d&perpage=%d"
            , $this->page
            , $this->perpage
            );
        
        // add filter if value is not empty
        foreach ($this->filters as $filter) {
            if (! empty($filter['value'])) {
                $uri .= sprintf("&%s=%s"
                    , $filter['field']
                    , rawurlencode($filter['value'])
                    );
            }
        }
        
        $res = $this->client->call($uri);

        // get and preserve pagination
        $lr = Client::getLastResponse();
        $this->pagination = isset($lr['body']) && isset($lr['body']['pagination']) ? $lr['body']['pagination'] : [];
        
        // convert array to Entities collection
        $this->data = [];
        foreach ($res as $data) {
            $this->data[] = (new Entity([], $this->client))->setData($data);
        }
        $this->current = 0;
        
        return $this->data;
    }
335107
private Page getExistingPage(final String name) throws FrameworkException {
		return StructrApp.getInstance().nodeQuery(Page.class).andName(name).getFirst();
	}
985765
public function evaluatePage() {
    if ($this->webPage == null) {
      throw new HttpNotFound();
    }

    $requestMethod = Server::getRequestMethod();
    $reflectionObject = new \ReflectionObject($this->webPage);

    if (!$reflectionObject->hasMethod($requestMethod)) {
      throw new HttpMethodNotAllowed();
    }

    $this->evaluatePermissions();

    // initialize the page
    $initializeParameters = $this->getParametersForMethod($reflectionObject->getMethod(self::INITIALIZE_FUNCTION));
    call_user_func_array([$this->webPage, self::INITIALIZE_FUNCTION], $initializeParameters);

    $renderParameters = $this->getParametersForMethod($reflectionObject->getMethod(self::FALLBACK_FUNCTION));
    try {
      $result = call_user_func_array([$this->webPage, self::FALLBACK_FUNCTION], $renderParameters);
      if (!($result instanceof Response)) {
        throw new HttpInternalServerError("The result of initialize has to be of type 'Response'");
      }
      return $result;
    } catch (HttpMethodNotAllowed $exc) {
      // empty on purpose (try render first, if its not overridden, fall through)
    }

    $requestMethodParameters = $this->getParametersForMethod($reflectionObject->getMethod($requestMethod));
    $result = call_user_func_array([$this->webPage, $requestMethod], $requestMethodParameters);
    if (!($result instanceof Response)) {
      throw new HttpInternalServerError("The result of $requestMethod has to be of type 'Response'");
    }
    return $result;
  }
1217473
public static function getUrl()
    {
        if (static::isCLI()) {
            return null;
        }

        if (static::$url === null) {
            $url = 'http';
            if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
                $url .= 's';
            }
            $url .= '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
            static::$url = new Url($url);
        }

        return static::$url;
    }
1268980
public com.google.api.Http getHttp() {
    return http_ == null ? com.google.api.Http.getDefaultInstance() : http_;
  }
1352563
public int get(String url) throws Exception {
        OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder()
                .url(url)
                .build();
        try(Response response = client.newCall(request).execute()) {
            if (!response.isSuccessful()) {
                throw new Exception("error sending HTTP GET to this URL: " + url);
            }
            return response.code();
        }
    }
1195569
public String url() {
        try {
            return driver.getCurrentUrl();
        } catch (Exception e) {
            log.warn(e);
            return null;
        }
    }
514235
@SuppressWarnings("null")
  public static @Nullable Page getContentPage(@NotNull HttpServletRequest request) {
    SlingHttpServletRequest slingRequest = (SlingHttpServletRequest)request;
    Resource contentResource = getContentResourceOrParent(request);
    if (contentResource != null) {
      PageManager pageManager = slingRequest.getResourceResolver().adaptTo(PageManager.class);
      return pageManager.getContainingPage(contentResource);
    }
    else {
      return null;
    }
  }
352530
public String getUrl() {
		if (StringUtils.isBlank(url) && !StringUtils.isBlank(name)) {
			this.url = AWSQueueUtils.createQueue(name);
		}
		return url;
	}
186936
public HttpServletRequest getRequest() {
        HttpServletRequest request = threadLocalRequests.get();
        return request == null ? orginal : request;
    }
774079
public I addPage(WebPage webPage) {
        beforeAddPageEvent(webPage);
        urls.put(baseUrl + webPage.constructName(), webPage);
        return getThis();
    }
5227
public int doEndTag()
            throws JspException {

        if(hasErrors())
            reportErrors();
        else {
            AbstractCallMethod cm = (AbstractCallMethod)getParent();
            cm.addParameter(_type, _isNull ? null : _value);
        }

        localRelease();
        return EVAL_PAGE;
    }
446004
public function getPage(string $url = null): Page
	{
		$page = $this->orm->pages->getByUrl($url, $this->translator->getLocale());
		if (!$page || !$page->visible) {
			throw new BadRequestException(null, IResponse::S404_NOT_FOUND);
		}
		return $page;
	}