PHP Класс Webiny\Component\Http\Session\Storage\CacheStorage

Наследование: implements Webiny\Component\Http\Session\SessionStorageInterface, use trait Webiny\Component\Cache\CacheTrait
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( ConfigObject $config )
close ( ) : boolean PHP >= 5.4.0
Close the session
destroy ( integer $session_id ) : boolean PHP >= 5.4.0
Destroy a session
gc ( integer $maxlifetime ) : boolean PHP >= 5.4.0
Cleanup old sessions
open ( string $save_path, string $session_id ) : boolean PHP >= 5.4.0
Initialize session
read ( string $session_id ) : string PHP >= 5.4.0
Read session data
write ( string $session_id, string $session_data ) : boolean PHP >= 5.4.0
Write session data

Описание методов

__construct() публичный Метод

public __construct ( ConfigObject $config )
$config Webiny\Component\Config\ConfigObject Config options.

close() публичный Метод

PHP >= 5.4.0
Close the session
public close ( ) : boolean
Результат boolean

The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

destroy() публичный Метод

PHP >= 5.4.0
Destroy a session
public destroy ( integer $session_id ) : boolean
$session_id integer The session ID being destroyed.
Результат boolean

The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

gc() публичный Метод

PHP >= 5.4.0
Cleanup old sessions
public gc ( integer $maxlifetime ) : boolean
$maxlifetime integer

Sessions that have not updated for the last maxlifetime seconds will be removed.

Результат boolean

The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

open() публичный Метод

PHP >= 5.4.0
Initialize session
public open ( string $save_path, string $session_id ) : boolean
$save_path string The path where to store/retrieve the session.
$session_id string The session id.
Результат boolean

The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.

read() публичный Метод

PHP >= 5.4.0
Read session data
public read ( string $session_id ) : string
$session_id string The session id to read data for.
Результат string

Returns an encoded string of the read data. If nothing was read, it must return an empty string. Note this value is returned internally to PHP for processing.

write() публичный Метод

PHP >= 5.4.0
Write session data
public write ( string $session_id, string $session_data ) : boolean
$session_id string The session id.
$session_data string

The encoded session data. This data is the result of the PHP internally encoding the $_SESSION superglobal to a serialized string and passing it as this parameter. Please note sessions use an alternative serialization method.

Результат boolean

The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.