PHP Class Webiny\Component\Http\Session\Storage\CacheStorage

Inheritance: implements Webiny\Component\Http\Session\SessionStorageInterface, use trait Webiny\Component\Cache\CacheTrait
Afficher le fichier Open project: Webiny/Framework

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

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

close() public méthode

PHP >= 5.4.0
Close the session
public close ( ) : boolean
Résultat boolean

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

destroy() public méthode

PHP >= 5.4.0
Destroy a session
public destroy ( integer $session_id ) : boolean
$session_id integer The session ID being destroyed.
Résultat boolean

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

gc() public méthode

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.

Résultat boolean

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

open() public méthode

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.
Résultat boolean

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

read() public méthode

PHP >= 5.4.0
Read session data
public read ( string $session_id ) : string
$session_id string The session id to read data for.
Résultat 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() public méthode

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.

Résultat boolean

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