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
Datei anzeigen Open project: phalcon/incubator Class Usage Examples

Protected Properties

Property 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

Public Methods

Method 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 method

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

close() public method

public close ( ) : boolean
return boolean

destroy() public method

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

gc() public method

public gc ( ) : boolean
return boolean

getDb() public method

Gets the Aerospike instance.
public getDb ( ) : Aerospike
return Aerospike

open() public method

public open ( ) : boolean
return boolean

read() public method

public read ( string $sessionId ) : string
$sessionId string Session variable name
return string

write() public method

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
return Phalcon\Cache\Backend\Aerospike

$lifetime protected_oe property

Session lifetime
protected int $lifetime
return integer

$namespace protected_oe property

Default Aerospike namespace
protected string $namespace
return string

$prefix protected_oe property

Key prefix
protected string $prefix
return string

$set protected_oe property

The Aerospike Set for store sessions
protected string $set
return string