コード例 #1
0
 /**
  * Stop output buffering and save the cache to the fCache directory, and then display
  * it to the browser.
  * 
  * @return boolean 				If saving was successful
  */
 public static function save()
 {
     if (static::$authorized_override) {
         return false;
     }
     if (!static::$enabled) {
         return false;
     }
     $contents = fBuffer::get();
     fBuffer::stop();
     static::$cache->set($identifier, $contents, static::$ttl);
     return true;
 }
コード例 #2
0
ファイル: fTemplating.php プロジェクト: philip/flourish
 /**
  * Erases all output since the invocation of the template - only works if buffering is on
  * 
  * @return void
  */
 public function destroy()
 {
     if (!$this->buffered_id) {
         throw new fProgrammerException('A template can only be destroyed if buffering has been enabled');
     }
     $this->buffered_id = NULL;
     fBuffer::erase();
     fBuffer::stop();
     $this->__destruct();
 }
コード例 #3
0
 public function tearDown()
 {
     if ($this->started_capture) {
         fBuffer::stopCapture();
         $this->started_capture = FALSE;
     }
     if ($this->started_buffer) {
         ob_clean();
         fBuffer::stop();
         $this->started_buffer = FALSE;
     }
 }