This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/includes/kohana/system/classes/Kohana/Session/Cookie.php

56 lines
932 B
PHP
Raw Normal View History

2012-11-22 03:25:06 +00:00
<?php defined('SYSPATH') OR die('No direct script access.');
2011-01-13 14:49:56 +00:00
/**
* Cookie-based session class.
*
* @package Kohana
* @category Session
* @author Kohana Team
2012-11-22 03:25:06 +00:00
* @copyright (c) 2008-2012 Kohana Team
2011-01-13 14:49:56 +00:00
* @license http://kohanaframework.org/license
*/
class Kohana_Session_Cookie extends Session {
/**
* @param string $id session id
* @return string
*/
protected function _read($id = NULL)
{
return Cookie::get($this->_name, NULL);
}
/**
* @return null
*/
protected function _regenerate()
{
// Cookie sessions have no id
return NULL;
}
/**
* @return bool
*/
protected function _write()
{
return Cookie::set($this->_name, $this->__toString(), $this->_lifetime);
}
2012-11-22 03:25:06 +00:00
/**
* @return bool
*/
protected function _restart()
{
return TRUE;
}
2011-01-13 14:49:56 +00:00
/**
* @return bool
*/
protected function _destroy()
{
return Cookie::delete($this->_name);
}
} // End Session_Cookie