Returns the page extension, got from the page `url_extension` config and falls back to the
system config `system.pages.append_url_extension`.

@return string      The extension of this page. For example `.html`
779165
public function urlExtension()
    {
        if ($this->home()) {
            return '';
        }

        // if not set in the page get the value from system config
        if (null === $this->url_extension) {
            $this->url_extension = Grav::instance()['config']->get('system.pages.append_url_extension', '');
        }

        return $this->url_extension;
    }
608855
public function getPageContent()
    {
        $response = Director::test($this->owner->Link());

        if (!$response->isError()) {
            return $response->getBody();
        }

        return '';
    }
1359141
public function getURL()
    {
        if ($this->cPointerExternalLink != '') {
            $link = $this->cPointerExternalLink;
        } elseif ($this->cPath) {
            $link = $this->cPath;
        } elseif ($this->cID == Page::getHomePageID()) {
            $link = DIR_REL . '/';
        } else {
            $link = DIR_REL . '/' . DISPATCHER_FILENAME . '?cID=' . $this->cID;
        }

        return $link;
    }
15298
public static function pageURL() {
		$URL = "http";
		if(!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {
			$URL .= "s";
		}
		$URL .= "://".$_SERVER["SERVER_NAME"];
		if($_SERVER["SERVER_PORT"] != "80") {
			$URL .= ":".$_SERVER["SERVER_PORT"];
		}
		$URL .= $_SERVER["REQUEST_URI"];
		return $URL;
	}
1346763
public function base($page) {
        if (!$this->urls) {
            $urls = [];
            if ($this->ogpath) {
                $urls [0] = implode('', [WWWROOT_DIR, $this->ogpath, '/', $this->ogname]);
            } else {
                $urls [0] = implode('', [WWWROOT_DIR, $this->ogname]);
            }
            $urls [1] = '';
            $suffix   = [];
            if ($this->ext) {
                $suffix [] = '.';
                $suffix [] = $this->ext;
            }
            if ($this->params) {
                $suffix [] = '?';
                $suffix [] = http_build_query($this->params, 'n');
            }
            if ($suffix) {
                $urls[2] = implode('', $suffix);
            }
            $this->urls = $urls;
        }
        if ($page > 1 || $page == 'all') {
            $this->urls [1] = '_' . $page;
        }
        $url            = implode('', $this->urls);
        $this->urls [1] = '';

        return $url;
    }
1091088
public function Link()
    {
        $link = '';
        switch ($this->type) {
            case 'Internal' :
                if ($this->internal && ($page = SiteTree::get()->byID($this->internal))) {
                    $link = $page->Link();
                }
                break;
            case 'External' :
                $link = $this->external;
                break;
            case 'Email' :
                $link = $this->email ? 'mailto:' . $this->email : '';
                break;
            case 'File' :
                if ($this->file) {
                    $link = File::get()->byID($this->file)->Filename;
                }
                break;
            case 'DataObject':
                if ($do = $this->getDO()) {
                    $link = $do->Link();
                }
                break;
        }

        if ($this->extra) {
            //added a query string, but no ? to start it
            if (strpos($this->extra, '=' !== false && strpos($this->extra, '?' === false))) {
                $link .= '?';
            }

            $link .= $this->extra;
        }

        if ($this->anchor) {
            $link .= '#' . $this->anchor;
        }

        return $link;
    }
935638
protected function getUrlPattern()
    {
        if ( $this->urlPattern )
        {
            return $this->urlPattern;
        }

        $domains = iterator_to_array( $this->getDomainList() );

        if ( empty( $domains ) )
        {
            $domains = array( 'localhost' );
        }

        return $this->urlPattern = '(|(https?:)?//([^/]+\.)?('
             . implode( '|', array_map( 'preg_quote', $domains ) )
             . ')(:\d+)?)';
    }
1068776
public function get_extension()
  {
    if ( $this->name ){
      if ( !isset($this->ext) ){
        if ( strpos($this->name, '.') !== false ){
          $p = str::file_ext($this->name, 1);
          $this->ext = $p[1];
          $this->title = $p[0];
        }
        else{
          $this->ext = '';
          $this->title = substr($this->name,-1) === '/' ? substr($this->name,0,-1) : $this->name;
        }
      }
      return $this->ext;
    }
    return false;
  }
98613
protected function getPageUrl()
    {
        // Fetch chash
        $pageHash = null;
        if (!empty($GLOBALS['TSFE']->cHash)) {
            $pageHash = $GLOBALS['TSFE']->cHash;
        }


        // Fetch pageUrl
        if ($pageHash !== null) {
            $ret = FrontendUtility::getCurrentUrl();
        } else {
            $linkConf = array(
                'parameter' => $GLOBALS['TSFE']->id,
            );

            $ret = $GLOBALS['TSFE']->cObj->typoLink_URL($linkConf);
            $ret = $this->processLinkUrl($ret);
        }

        return $ret;
    }
1202746
public function getNameWithExtension()
    {
        return $this->extension === '' ? $this->name : sprintf('%s.%s', $this->name, $this->extension);
    }
530139
public String getExtension() {
        String extension = getSlingRequest().getRequestPathInfo().getExtension();
        return StringUtils.isBlank(extension) ? "" : ("." + extension);
    }
229005
public function get()
    {
        if ($this->page_count <= 1) {
            return '';
        }

        // Output HTML holder.
        $output = '';

        $output .= $this->get_opening_links();
        $output .= $this->get_links();
        $output .= $this->get_closing_links();

        // Apply before and after content if present in the args.
        if (! empty($output)) {
            $output = $this->args['before_output'] . $output . $this->args['after_output'];
        }

        /**
         * Filter snap_pagination output.
         *
         * @since  1.0.0
         *
         * @var string $output The output HTML for the pagination.
         * @return  string The filtered HTML.
         */
        $output = apply_filters('snap_pagination_output', $output);

        return $output;
    }
1322511
public function getExtension()
    {
        $pathInfo = pathinfo($this->getName());
        $extension = ExtensionGuesser::getInstance()->guess($this->getMimeType());
        if ($extension) {
            return $extension;
        } elseif (isset($pathInfo['extension'])) {
            return $pathInfo['extension'];
        }

        return null;
    }
955963
public function getPathInfo()
    {
        $pathInfo = parent::getPathInfo();
        $pathLength = \strlen($pathInfo);

        if ($pathInfo !== '/' && $pathInfo[$pathLength - 1] === '/'
            && (bool) ConfigQuery::read('allow_slash_ended_uri', false)
        ) {
            if (null === $this->resolvedPathInfo) {
                $this->resolvedPathInfo = substr($pathInfo, 0, $pathLength - 1); // Remove the slash
            }

            $pathInfo = $this->resolvedPathInfo;
        }

        return $pathInfo;
    }
895566
private function getShownExtension()
    {
        if($this->hasRequestParameter('shownExtension')){
            $shownExtension = $this->getRequestParameter('shownExtension');
            if(strlen(trim($shownExtension)) > 0){
                $extension = $this->getExtension($shownExtension);
                return $extension->getName();
            }
        }
        return null;
    }
193153
public function getURL()
    {
        $p = $this->recall('page');

        // If there is a login page, no need to return to it
        if ($p == 'login') {
            return $this->app->url('/');
        }

        $url = $this->app->url($p, $this->recall('args', null));
        $this->forget('page');
        $this->forget('args');

        return $url;
    }
89207
public function getExtension()
    {
        if (is_null($this->extension) === true) {
            $filename = parent::getFilename();
            $str = new StringWrapper($filename);
            $this->extension = $str->getFirstEndMatch($this->predefinedExtensions);
            $this->hasPredefinedExt = true;

            if ($this->extension === '') {
                $this->hasPredefinedExt = false;
                $this->extension = parent::getExtension();
            }
        }

        return $this->extension;
    }