original_string: protected function getSitemapEntries(ProfileInterface $profile)
      {
          $now = new \DateTime();
          $urlEntries = $profile->getUrlEntries();
          $numberOfSitemap = $this->getNumberOfSitemap($urlEntries);
  
          if (1 === $numberOfSitemap) {
              $this->writeFile(
                  $this->helper->getSitemapEntryFilePath($this->getFilename($profile)),
                  $this->render->renderSitemap($urlEntries)
              );
  
              return array(new SitemapEntry($this->helper->getSitemapEntryFileUrl($this->getFilename($profile)), $now));
          }
  
  
          $sitemapEntries = array();
  
          for ($number = 0; $number < $numberOfSitemap; $number++) {
              $filename = $this->getFilename($profile, $number);
              $entries = array_slice($urlEntries, $number * $this->maxPerSitemap, $this->maxPerSitemap);
  
              $this->writeFile($this->helper->getSitemapEntryFilePath($filename), $this->render->renderSitemap($entries));
  
              $sitemapEntries[] = new SitemapEntry($this->helper->getSitemapEntryFileUrl($filename), $now);
          }
  
          return $sitemapEntries;
      }
code: protected function getSitemapEntries(ProfileInterface $profile)
      {
          $now = new \DateTime();
          $urlEntries = $profile->getUrlEntries();
          $numberOfSitemap = $this->getNumberOfSitemap($urlEntries);
  
          if (1 === $numberOfSitemap) {
              $this->writeFile(
                  $this->helper->getSitemapEntryFilePath($this->getFilename($profile)),
                  $this->render->renderSitemap($urlEntries)
              );
  
              return array(new SitemapEntry($this->helper->getSitemapEntryFileUrl($this->getFilename($profile)), $now));
          }
  
  
          $sitemapEntries = array();
  
          for ($number = 0; $number < $numberOfSitemap; $number++) {
              $filename = $this->getFilename($profile, $number);
              $entries = array_slice($urlEntries, $number * $this->maxPerSitemap, $this->maxPerSitemap);
  
              $this->writeFile($this->helper->getSitemapEntryFilePath($filename), $this->render->renderSitemap($entries));
  
              $sitemapEntries[] = new SitemapEntry($this->helper->getSitemapEntryFileUrl($filename), $now);
          }
  
          return $sitemapEntries;
      }
code_tokens: protected function getSitemapEntries ( ProfileInterface $ profile ) { $ now = new \ DateTime ( ) ; $ urlEntries = $ profile -> getUrlEntries ( ) ; $ numberOfSitemap = $ this -> getNumberOfSitemap ( $ urlEntries ) ; if ( 1 === $ numberOfSitemap ) { $ this -> writeFile ( $ this -> helper -> getSitemapEntryFilePath ( $ this -> getFilename ( $ profile ) ) , $ this -> render -> renderSitemap ( $ urlEntries ) ) ; return array ( new SitemapEntry ( $ this -> helper -> getSitemapEntryFileUrl ( $ this -> getFilename ( $ profile ) ) , $ now ) ) ; } $ sitemapEntries = array ( ) ; for ( $ number = 0 ; $ number < $ numberOfSitemap ; $ number ++ ) { $ filename = $ this -> getFilename ( $ profile , $ number ) ; $ entries = array_slice ( $ urlEntries , $ number * $ this -> maxPerSitemap , $ this -> maxPerSitemap ) ; $ this -> writeFile ( $ this -> helper -> getSitemapEntryFilePath ( $ filename ) , $ this -> render -> renderSitemap ( $ entries ) ) ; $ sitemapEntries [ ] = new SitemapEntry ( $ this -> helper -> getSitemapEntryFileUrl ( $ filename ) , $ now ) ; } return $ sitemapEntries ; }
docstring: Get sitemap entries.
  
  @param ProfileInterface $profile
  
  @return array|SitemapEntry[]
docstring_tokens: Get sitemap entries .