/** * Template loading and setup routine. */ public function __construct() { parent::__construct(); if ($this->auto_render == YES) { // Render the template along with the system display stuff Event::add_before('system.display', array($this, 'render'), array($this, '_render')); } }
public function __construct() { $this->cache = new Cache(); // Account for Gzip compression $this->gzip = Kohana::config('settings.gz'); // If this is a POST, disable cache if (empty($_POST)) { Event::add_before('system.routing', array('Router', 'setup'), array($this, 'load_cache')); } }
public function __construct() { $this->cache = new Cache(); // Gzip compression $this->gzip = Kohana::config('settings.gz'); // Subdomain (MHI)? $subdomain = Kohana::config('settings.subdomain'); if (!empty($subdomain)) { $this->subdomain = $subdomain . "_"; } // If this is a POST, disable cache if (empty($_POST)) { Event::add_before('system.routing', array('Router', 'setup'), array($this, 'load_cache')); } }
public function __construct() { $this->cache = new Cache(); Event::add_before('system.routing', array('Router', 'setup'), array($this, 'load_cache')); }
public function __construct() { $this->cache = new Cache(); Event::add_before('system.routing', array('Router', 'setup'), array($this, 'load')); Log::add('debug', 'Page_Cache Hook initialized'); }
/** * S7Ncms - www.s7n.de * * Copyright (c) 2007-2009, Eduard Baun <eduard at baun.de> * All rights reserved. * * See license.txt for full text and disclaimer * * @author Eduard Baun <eduard at baun.de> * @copyright Eduard Baun, 2007-2009 * @version $Id$ */ Event::add('system.ready', 'module::load_modules'); Event::add('system.ready', 'config::load'); Event::add_before('system.routing', array('Router', 'setup'), array('language', 'setup')); Event::add_before('system.routing', array('Router', 'setup'), array('url', 'new_route')); Event::add('system.post_routing', 'theme::load_themes'); function __($string, array $values = array()) { if (I18n::$lang !== I18n::$default_lang) { $string = I18n::get($string); } return empty($values) ? $string : strtr($string, $values); } function __n($singular, $plural, $count, array $values = array()) { if (I18n::$lang !== I18n::$default_lang) { $string = $count === 1 ? I18n::get($singular) : I18n::get_plural($plural, $count); } else { $string = $count === 1 ? $singular : $plural; }