0 follower

CHttpSessionHandler

Package system.web
Inheritance class CHttpSessionHandler
Implements SessionHandlerInterface
Since 1.1.32
Source Code framework/web/CHttpSessionHandler.php
CHttpSessionHandler is an adapter that implements SessionHandlerInterface for CHttpSession.

Delegates all calls to CHttpSession's openSession/closeSession/etc. methods, allowing subclasses like CDbHttpSession to work without modification.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Constructor. CHttpSessionHandler
close() Close the session. CHttpSessionHandler
destroy() Destroy a session. CHttpSessionHandler
gc() Cleanup old sessions. CHttpSessionHandler
open() Initialize session. CHttpSessionHandler
read() Read session data. CHttpSessionHandler
write() Write session data. CHttpSessionHandler

Method Details

__construct() method
public void __construct(CHttpSession $session)
$session CHttpSession
Source Code: framework/web/CHttpSessionHandler.php#31 (show)
public function __construct(CHttpSession $session)
{
    
$this->_session=$session;
}

Constructor.

close() method
public bool close()
{return} bool
Source Code: framework/web/CHttpSessionHandler.php#53 (show)
public function close()
{
    return 
$this->_session->closeSession();
}

Close the session.

destroy() method
public bool destroy(string $id)
$id string
{return} bool
Source Code: framework/web/CHttpSessionHandler.php#87 (show)
public function destroy($id)
{
    return 
$this->_session->destroySession($id);
}

Destroy a session.

gc() method
public int|false gc(int $max_lifetime)
$max_lifetime int
{return} int|false
Source Code: framework/web/CHttpSessionHandler.php#98 (show)
public function gc($max_lifetime)
{
    return 
$this->_session->gcSession($max_lifetime) ? false;
}

Cleanup old sessions.

open() method
public bool open(string $path, string $name)
$path string
$name string
{return} bool
Source Code: framework/web/CHttpSessionHandler.php#43 (show)
public function open($path$name)
{
    return 
$this->_session->openSession($path$name);
}

Initialize session.

read() method
public string|false read(string $id)
$id string
{return} string|false
Source Code: framework/web/CHttpSessionHandler.php#64 (show)
public function read($id)
{
    return 
$this->_session->readSession($id);
}

Read session data.

write() method
public bool write(string $id, string $data)
$id string
$data string
{return} bool
Source Code: framework/web/CHttpSessionHandler.php#76 (show)
public function write($id$data)
{
    return 
$this->_session->writeSession($id$data);
}

Write session data.