SDK for PHP 3.x

StandardSessionConnection
in package
implements SessionConnectionInterface Uses SessionConnectionConfigTrait

The standard connection performs the read and write operations to DynamoDB.

Table of Contents

Interfaces

SessionConnectionInterface
The session connection provides the underlying logic for interacting with Amazon DynamoDB and performs all of the reading and writing operations.

Methods

__construct()  : mixed
delete()  : bool
Deletes session record from DynamoDB
deleteExpired()  : bool
Performs garbage collection on the sessions stored in the DynamoDB
getBatchConfig()  : mixed
getDataAttribute()  : string
getDataAttributeType()  : string
getHashKey()  : string
getMaxLockRetryMicrotime()  : number
getMaxLockWaitTime()  : number
getMinLockRetryMicrotime()  : number
getSessionLifetime()  : number
getSessionLifetimeAttribute()  : string
getTableName()  : string
initConfig()  : mixed
It initialize the Config class and it sets values in case of valid configurations.
isConsistentRead()  : bool
isLocking()  : bool
read()  : array<string|int, mixed>
Reads session data from DynamoDB
setBatchConfig()  : mixed
setConsistentRead()  : mixed
setDataAttribute()  : mixed
setDataAttributeType()  : mixed
setHashKey()  : mixed
setLocking()  : mixed
setMaxLockRetryMicrotime()  : mixed
setMaxLockWaitTime()  : mixed
setMinLockRetryMicrotime()  : mixed
setSessionLifetime()  : mixed
setSessionLifetimeAttribute()  : mixed
setTableName()  : mixed
write()  : bool
Writes session data to DynamoDB

Methods

__construct()

public __construct(DynamoDbClient $client[, array<string|int, mixed> $config = [] ]) : mixed
Parameters
$client : DynamoDbClient

DynamoDB client

$config : array<string|int, mixed> = []

Session handler config

delete()

Deletes session record from DynamoDB

public delete(mixed $id) : bool
Parameters
$id : mixed

Session ID

Return values
bool

deleteExpired()

Performs garbage collection on the sessions stored in the DynamoDB

public deleteExpired() : bool
Return values
bool

getBatchConfig()

public getBatchConfig() : mixed

getDataAttribute()

public getDataAttribute() : string
Return values
string

getDataAttributeType()

public getDataAttributeType() : string
Return values
string

getHashKey()

public getHashKey() : string
Return values
string

getMaxLockRetryMicrotime()

public getMaxLockRetryMicrotime() : number
Return values
number

getMaxLockWaitTime()

public getMaxLockWaitTime() : number
Return values
number

getMinLockRetryMicrotime()

public getMinLockRetryMicrotime() : number
Return values
number

getSessionLifetime()

public getSessionLifetime() : number
Return values
number

getSessionLifetimeAttribute()

public getSessionLifetimeAttribute() : string
Return values
string

getTableName()

public getTableName() : string
Return values
string

initConfig()

It initialize the Config class and it sets values in case of valid configurations.

public initConfig([array<string|int, mixed> $config = [] ]) : mixed

It transforms parameters underscore separated in camelcase "this_is_a_test" => ThisIsATest and it uses it in order to set the values.

Parameters
$config : array<string|int, mixed> = []

isConsistentRead()

public isConsistentRead() : bool
Return values
bool

isLocking()

public isLocking() : bool
Return values
bool

read()

Reads session data from DynamoDB

public read(mixed $id) : array<string|int, mixed>
Parameters
$id : mixed

Session ID

Return values
array<string|int, mixed>

setBatchConfig()

public setBatchConfig(mixed $batchConfig) : mixed
Parameters
$batchConfig : mixed

setConsistentRead()

public setConsistentRead(bool $consistentRead) : mixed
Parameters
$consistentRead : bool

setDataAttribute()

public setDataAttribute(string $dataAttribute) : mixed
Parameters
$dataAttribute : string

setDataAttributeType()

public setDataAttributeType(string $dataAttributeType) : mixed
Parameters
$dataAttributeType : string

setHashKey()

public setHashKey(string $hashKey) : mixed
Parameters
$hashKey : string

setLocking()

public setLocking(bool $locking) : mixed
Parameters
$locking : bool

setMaxLockRetryMicrotime()

public setMaxLockRetryMicrotime(number $maxLockRetryMicrotime) : mixed
Parameters
$maxLockRetryMicrotime : number

setMaxLockWaitTime()

public setMaxLockWaitTime(number $maxLockWaitTime) : mixed
Parameters
$maxLockWaitTime : number

setMinLockRetryMicrotime()

public setMinLockRetryMicrotime(number $minLockRetryMicrotime) : mixed
Parameters
$minLockRetryMicrotime : number

setSessionLifetime()

public setSessionLifetime(number $sessionLifetime) : mixed
Parameters
$sessionLifetime : number

setSessionLifetimeAttribute()

public setSessionLifetimeAttribute(string $sessionLifetimeAttribute) : mixed
Parameters
$sessionLifetimeAttribute : string

setTableName()

public setTableName(string $tableName) : mixed
Parameters
$tableName : string

write()

Writes session data to DynamoDB

public write(mixed $id, mixed $data, mixed $isChanged) : bool
Parameters
$id : mixed

Session ID

$data : mixed

Serialized session data

$isChanged : mixed

Whether or not the data has changed

Return values
bool
On this page