From 12fe58d997d2066dc362fd393a18b4e5da190513 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 27 May 2009 15:11:53 -0700 Subject: Rename 'kohana' to 'system' to conform to the Kohana filesystem layout. I'm comfortable with us not clearly drawing the distinction about the fact that it's Kohana. --- kohana/libraries/drivers/Session/Cookie.php | 80 ----------------------------- 1 file changed, 80 deletions(-) delete mode 100644 kohana/libraries/drivers/Session/Cookie.php (limited to 'kohana/libraries/drivers/Session/Cookie.php') diff --git a/kohana/libraries/drivers/Session/Cookie.php b/kohana/libraries/drivers/Session/Cookie.php deleted file mode 100644 index 7b791064..00000000 --- a/kohana/libraries/drivers/Session/Cookie.php +++ /dev/null @@ -1,80 +0,0 @@ -cookie_name = Kohana::config('session.name').'_data'; - - if (Kohana::config('session.encryption')) - { - $this->encrypt = Encrypt::instance(); - } - - Kohana::log('debug', 'Session Cookie Driver Initialized'); - } - - public function open($path, $name) - { - return TRUE; - } - - public function close() - { - return TRUE; - } - - public function read($id) - { - $data = (string) cookie::get($this->cookie_name); - - if ($data == '') - return $data; - - return empty($this->encrypt) ? base64_decode($data) : $this->encrypt->decode($data); - } - - public function write($id, $data) - { - $data = empty($this->encrypt) ? base64_encode($data) : $this->encrypt->encode($data); - - if (strlen($data) > 4048) - { - Kohana::log('error', 'Session ('.$id.') data exceeds the 4KB limit, ignoring write.'); - return FALSE; - } - - return cookie::set($this->cookie_name, $data, Kohana::config('session.expiration')); - } - - public function destroy($id) - { - return cookie::delete($this->cookie_name); - } - - public function regenerate() - { - session_regenerate_id(TRUE); - - // Return new id - return session_id(); - } - - public function gc($maxlifetime) - { - return TRUE; - } - -} // End Session Cookie Driver Class \ No newline at end of file -- cgit v1.2.3