Fetch a content page by its name

@param string $pageName

@return ContentPage
426479
public function fetchPage($pageName)
    {
        $pageName = (string) $pageName;

        if (!array_key_exists($pageName, $this->pages))
        {
            if ('' == $pageName)
            {
                $page = ContentPageQuery::create()
                    ->filterByIsPublished(true)
                    ->filterByName(null, Criteria::ISNULL)
                    ->_or()
                    ->filterByName('')
                    ->findOne()
                ;
            }
            else
            {
                $page = ContentPageQuery::create()
                    ->filterByIsPublished(true)
                    ->filterByName($pageName)
                    ->findOne()
                ;
            }

            $this->pages[$pageName] = $page;
        }

        return $this->pages[$pageName];
    }
33431
public String getPageContent(String pageTitle) throws Exception {
    String result = this.getPageContent(pageTitle, "", false);
    return result;
  }
713362
protected function getPage(
        Site $site,
        $pageName,
        $pageType
    ) {
        if (empty($site) || !$site->getSiteId()) {
            return null;
        }

        /* Get the Page for display */
        $page = $this->findPage->__invoke(
            $site->getSiteId(),
            $pageName,
            $pageType
        );

        return $page;
    }
1339706
def get_content(request, page_id, content_id):
    """"""
    content = Content.objects.get(pk=content_id)
    return HttpResponse(content.body)
1324995
public function getByRouteName($routeName)
    {
        $this->fireLoadEvent();
        if (isset($this->pageTypesByRouteName[$routeName])) {
            return $this->pageTypesByRouteName[$routeName];
        }
    }
4203
public function getFile(string $name)
    {
        return $this->fileContentAreas->where(function (FileContentArea $contentArea) use ($name) {
            return $contentArea->name === $name;
        })->first();
    }
79243
protected function getContentVariable( $name )
    {
        if ( isset( $this->request->contentVariables[$name] ) )
        {
            return $this->request->contentVariables[$name];
        }

        return null;
    }
1300832
public function get($pageName)
    {
        $ds = DIRECTORY_SEPARATOR;
        $path = app_path().$ds.'lablog'.$ds.$pageName.'.page';

        $pageContent = $this->fs->get($path);

        $page = $this->config->strip($pageContent, '{PAGECONFIG}');

        $pageObject = new Page;
        $pageObject->name = $pageName;
        $pageObject->modified = $this->modified($path);
        $pageObject->content = $this->processor->process($page['content']);
        $pageObject->config = $page['config'];
        $pageObject->slug = $pageName;
        $pageObject->url = \URL::to(\Config::get('lablog::config.prefix').'/'.$pageName);

        return $pageObject;
    }
893804
public function findOneByRoute($routeName)
    {
        $qb = $this->getQueryBuilder('p');

        return $qb
            ->leftJoin('p.seo', 's')
            ->leftJoin('s.translations', 's_t', Expr\Join::WITH, $this->getLocaleCondition('s_t'))
            ->addSelect('s', 's_t')
            ->andWhere($qb->expr()->eq('p.route', ':route_name'))
            ->getQuery()
            ->setParameter('route_name', $routeName)
            ->useQueryCache(true)
            // TODO ->useResultCache(true, 3600, 'ekyna_cms.page[route:' . $routeName . ']')
            ->getOneOrNullResult();
    }
570814
public function get($name, $default = null)
    {
        if($name == 'pages' && !isset($this->pages)) {
            $this->pages = $this->_pages();
        }
        
        return parent::get($name);
    }
822824
protected static function urlencodePage( $pageName ) {
		static $needle = null;

		if ( $needle === null ) {
			$needle = array( '%3B', '%40', '%24', '%21', '%2A', '%28', '%29', '%2C', '%2F', '%3A' );
		}

		return str_ireplace(
			$needle,
			array( ';', '@', '$', '!', '*', '(', ')', ',', '/', ':' ),
			urlencode( str_replace( ' ', '_', $pageName ) )
		);
	}
954480
private function get($filename, $name)
    {
        if (!isset($this->contents[$filename])) {
            $this->contents[$filename] = $this->mc->get($filename);
        }
        $content = $this->contents[$filename];

        if (false === $content) {
            return false;
        }
        $info = array(
            'mtime'   => substr($content, 0, 10),
            'content' => substr($content, 10),
        );
        return $info[$name];
    }
583497
public function Get($TableName = '') {
		if($TableName)
			$this->Table($TableName);

		$Columns = $this->Database->SQL()->FetchTableSchema($this->_TableName);
		$this->_Columns = $Columns;

		return $this;
	}
1033565
public function getText(Page $page = null)
    {
        $header   = new Header(array(), $this->document);
        $contents = new PDFObject($this->document, $header, $this->content);

        return $contents->getText($this);
    }
225633
public function url($pageName, $pageType = PageTypes::NORMAL, $pageRevision = null)
    {
        /** @var \Zend\Mvc\Controller\AbstractActionController $controller */
        $view = $this->getView();

        if ($pageType == PageTypes::NORMAL && $pageName == 'index' && empty($pageRevision)) {
            return '/';
        } elseif ($pageType == PageTypes::NORMAL && empty($pageRevision)) {
            return $view->url(
                'contentManager',
                ['page' => $pageName]
            );
        } elseif ($pageType == PageTypes::NORMAL && !empty($pageRevision)) {
            return $view->url(
                'contentManager',
                [
                    'revision' => $pageRevision,
                    'page' => $pageName,
                ]
            );
        } elseif ($pageType != PageTypes::NORMAL && !empty($pageRevision)) {
            return $view->url(
                'contentManagerWithPageType',
                [
                    'revision' => $pageRevision,
                    'pageType' => $pageType,
                    'page' => $pageName,
                ]
            );
        } else {
            return $view->url(
                'contentManagerWithPageType',
                [
                    'pageType' => $pageType,
                    'page' => $pageName,
                ]
            );
        }
    }
1237237
public function getContentLibrary()
    {
        return $this->contentLibrary == null ?
            $this->contentLibrary = new PageContentLibraryImpl($this->container, $this) :
            $this->contentLibrary;
    }
1158051
public function get($filename)
    {
        $filename = $this->path($filename);

        if (!(is_file($filename) && stream_is_local($filename))) {
            return null;
        }

        return file_get_contents($filename);
    }