public static function set($name, $value, $expiration = NULL) { if (Kohana::$environment == Kohana::TESTING) { Request::initial()->cookie($name, $value); } else { return parent::set($name, $value, $expiration); } }
* - integer cache_life lifetime, in seconds, of items cached 60 * - boolean errors enable or disable error handling TRUE * - boolean profile enable or disable internal profiling TRUE * - boolean caching enable or disable internal caching FALSE * - boolean expose set the X-Powered-By header FALSE */ Kohana::init(array('base_url' => '/kohana/')); /** * Attach the file write to logging. Multiple writers are supported. */ Kohana::$log->attach(new Log_File(APPPATH . 'logs')); /** * Attach a file reader to config. Multiple readers are supported. */ Kohana::$config->attach(new Config_File()); /** * Enable modules. Modules are referenced by a relative or absolute path. */ Kohana::modules(array('database' => MODPATH . 'database', 'smarty' => MODPATH . 'smarty', 'smartyauth' => MODPATH . 'smartyauth', 'facebook' => MODPATH . 'facebook', 'blog' => MODPATH . 'blog')); /** * Set the routes. Each route must have a minimum of a name, a URI and a set of * defaults for the URI. */ Route::set('default', '(<controller>(/<action>(/<id>)))')->defaults(array('controller' => 'welcome', 'action' => 'index')); Kohana_Cookie::$salt = md5('somesalthere'); Kohana_Cookie::$expiration = 1209600; // 14 days Kohana_Cookie::$domain = 'coop.lc'; Session::$default = 'database'; //Cookie::$salt = 'wordsgohere'; //Cookie::$salt = 'coop';
/** * {@inheritDoc} */ public function forget() { Cookie::delete($this->key); }