示例#1
0
 public function load_cache()
 {
     if ($cache = $this->cache->get($this->subdomain . 'page_' . $this->gzip . '_' . $_SERVER['REQUEST_URI'])) {
         Kohana::render($cache);
         exit;
     } else {
         Event::add('system.display', array($this, 'save_cache'));
     }
 }
示例#2
0
 public function load_cache()
 {
     if ($cache = $this->cache->get('page_' . Router::$complete_uri)) {
         Kohana::render($cache);
         exit;
     } else {
         Event::add('system.display', array($this, 'save_cache'));
     }
 }
示例#3
0
 /**
  * Triggers the shutdown of Kohana by closing the output buffer, runs the system.display event.
  *
  * @return  void
  */
 public static function shutdown()
 {
     static $run;
     // Only run this function once
     if ($run === TRUE) {
         return;
     }
     $run = TRUE;
     // Run system.shutdown event
     Event::run('system.shutdown');
     // Close output buffers
     Kohana::close_buffers(TRUE);
     // Run the output event
     Event::run('system.display', Kohana::$output);
     // Render the final output
     Kohana::render(Kohana::$output);
 }
示例#4
0
 private function AutenticationFailed()
 {
     Kohana::render($this->encode(NULL, "Authentication Failed"));
     die;
 }