Class AbstractLockingStrategy
Base class for session locking strategies. Includes write and delete logic
- Aws\DynamoDb\Session\LockingStrategy\AbstractLockingStrategy implements Aws\DynamoDb\Session\LockingStrategy\LockingStrategyInterface
Direct known subclasses
Aws\DynamoDb\Session\LockingStrategy\NullLockingStrategy
,
Aws\DynamoDb\Session\LockingStrategy\PessimisticLockingStrategy
Abstract
Namespace: Aws\DynamoDb\Session\LockingStrategy
Located at Aws/DynamoDb/Session/LockingStrategy/AbstractLockingStrategy.php
Namespace: Aws\DynamoDb\Session\LockingStrategy
Located at Aws/DynamoDb/Session/LockingStrategy/AbstractLockingStrategy.php
Methods summary
-
public
__construct ( Aws\DynamoDb\DynamoDbClient $client, Aws\DynamoDb\Session\SessionHandlerConfig $config )
-
public
doWrite ( string $id, string $data, bool $isDataChanged )
Writes the session data to Dynamo DB
-
public
doDestroy ( string $id )
Deletes a session record from Dynamo DB
-
protected
formatKey ( string $keyValue )
Generates the correct key structure based on the key value and DynamoDB API version
-
abstract protected
getExtraAttributes ( )
Allows the specific strategy to add additional attributes to update
Methods detail
#
public
__construct( Aws\DynamoDb\DynamoDbClient
$client, Aws\DynamoDb\Session\SessionHandlerConfig
$config )
Parameters
- $client
Aws\DynamoDb\DynamoDbClient
$client The DynamoDB client- $config
Aws\DynamoDb\Session\SessionHandlerConfig
$config The session handler config options
Writes the session data to Dynamo DB
Parameters
- $id
string
$id The session ID- $data
string
$data The serialized session data- $isDataChanged
boolean
$isDataChanged Whether or not the data has changed
Returns
boolean
Implementation of
Deletes a session record from Dynamo DB
Parameters
- $id
string
$id The session ID
Returns
boolean
Implementation of
Generates the correct key structure based on the key value and DynamoDB API version
Parameters
- $keyValue
string
$keyValue The value of the key (i.e., the session ID)
Returns
array
formatted key structure
Allows the specific strategy to add additional attributes to update
Returns
array
Methods inherited from Aws\DynamoDb\Session\LockingStrategy\LockingStrategyInterface
Magic methods summary
Properties summary
protected
|
$client |
#
The DynamoDB client |
protected
|
$config |
#
The session handler config options |