original_string: public function getPage($url)
      {
          $pages = $this->getPages();
          $url = $this->normalizeUrl($url);
  
          if (!isset($pages[$url])) {
              return null;
          }
  
  
          $record = $pages[$url];
  
          foreach ($this->getEntities() as $entity) {
              if (strpos($record['filepath'], $entity->getPath()) !== false) {
                  $page =  Injector::inst()->create(
                      $record['type'],
                      $entity,
                      $record['basename'],
                      $record['filepath']
                  );
  
                  return $page;
              }
          }
      }
code: public function getPage($url)
      {
          $pages = $this->getPages();
          $url = $this->normalizeUrl($url);
  
          if (!isset($pages[$url])) {
              return null;
          }
  
  
          $record = $pages[$url];
  
          foreach ($this->getEntities() as $entity) {
              if (strpos($record['filepath'], $entity->getPath()) !== false) {
                  $page =  Injector::inst()->create(
                      $record['type'],
                      $entity,
                      $record['basename'],
                      $record['filepath']
                  );
  
                  return $page;
              }
          }
      }
code_tokens: public function getPage ( $ url ) { $ pages = $ this -> getPages ( ) ; $ url = $ this -> normalizeUrl ( $ url ) ; if ( ! isset ( $ pages [ $ url ] ) ) { return null ; } $ record = $ pages [ $ url ] ; foreach ( $ this -> getEntities ( ) as $ entity ) { if ( strpos ( $ record [ 'filepath' ] , $ entity -> getPath ( ) ) !== false ) { $ page = Injector :: inst ( ) -> create ( $ record [ 'type' ] , $ entity , $ record [ 'basename' ] , $ record [ 'filepath' ] ) ; return $ page ; } } }
docstring: Returns a particular page for the requested URL.
  
  @return DocumentationPage
docstring_tokens: Returns a particular page for the requested URL .