コード例 #1
0
ファイル: Generator.php プロジェクト: agentmedia/phine-core
 /**
  * Generates the xml by pulling it from cache or generating it
  * @return string
  */
 function Generate()
 {
     if ($this->cacher->MustUseCache()) {
         $this->xml = $this->cacher->GetFromCache();
         return;
     }
     $this->AddAllPages();
     $this->xml = $this->sitemap->SaveXml();
     if ($this->cacher->MustStoreToCache()) {
         $this->cacher->StoreToCache($this->xml);
     }
 }
コード例 #2
0
 /**
  * Stores to cache if necessary
  */
 protected function AfterGather()
 {
     if ($this->fileCacher->MustStoreToCache()) {
         $this->fileCacher->StoreToCache($this->output);
     }
     parent::AfterGather();
 }