PHP Class Phalcon\Session\Adapter\Aerospike

This adapter store sessions in Aerospike use Phalcon\Session\Adapter\Aerospike as AerospikeSession; $session = new AerospikeSession([ 'hosts' => [ ['addr' => '127.0.0.1', 'port' => 3000] ], 'persistent' => true, 'namespace' => 'test', 'prefix' => 'session_', 'lifetime' => 8600, 'uniqueId' => '3Hf90KdjQ18', 'options' => [ \Aerospike::OPT_CONNECT_TIMEOUT => 1250, \Aerospike::OPT_WRITE_TIMEOUT => 1500 ] ]); $session->start(); $session->set('var', 'some-value'); echo $session->get('var');
Inheritance: extends Phalcon\Session\Adapter, implements Phalcon\Session\AdapterInterface
Afficher le fichier Open project: phalcon/incubator Class Usage Examples

Protected Properties

Свойство Type Description
$db Phalcon\Cache\Backend\Aerospike The Aerospike DB
$lifetime integer Session lifetime
$namespace string Default Aerospike namespace
$prefix string Key prefix
$set string The Aerospike Set for store sessions

Méthodes publiques

Méthode Description
__construct ( array $options ) Phalcon\Session\Adapter\Aerospike constructor
close ( ) : boolean
destroy ( string $sessionId = null ) : boolean
gc ( ) : boolean
getDb ( ) : Aerospike Gets the Aerospike instance.
open ( ) : boolean
read ( string $sessionId ) : string
write ( string $sessionId, string $data )

Method Details

__construct() public méthode

Phalcon\Session\Adapter\Aerospike constructor
public __construct ( array $options )
$options array Constructor options

close() public méthode

public close ( ) : boolean
Résultat boolean

destroy() public méthode

public destroy ( string $sessionId = null ) : boolean
$sessionId string Session variable name [Optional]
Résultat boolean

gc() public méthode

public gc ( ) : boolean
Résultat boolean

getDb() public méthode

Gets the Aerospike instance.
public getDb ( ) : Aerospike
Résultat Aerospike

open() public méthode

public open ( ) : boolean
Résultat boolean

read() public méthode

public read ( string $sessionId ) : string
$sessionId string Session variable name
Résultat string

write() public méthode

public write ( string $sessionId, string $data )
$sessionId string Session variable name
$data string Session data

Property Details

$db protected_oe property

The Aerospike DB
protected Aerospike,Phalcon\Cache\Backend $db
Résultat Phalcon\Cache\Backend\Aerospike

$lifetime protected_oe property

Session lifetime
protected int $lifetime
Résultat integer

$namespace protected_oe property

Default Aerospike namespace
protected string $namespace
Résultat string

$prefix protected_oe property

Key prefix
protected string $prefix
Résultat string

$set protected_oe property

The Aerospike Set for store sessions
protected string $set
Résultat string