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 ) -
publicdoWrite ( string $id, string $data, bool $isDataChanged )Writes the session data to Dynamo DB
-
publicdoDestroy ( string $id )Deletes a session record from Dynamo DB
-
protectedformatKey ( string $keyValue )Generates the correct key structure based on the key value and DynamoDB API version
-
abstract protectedgetExtraAttributes ( )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
booleanImplementation of
Deletes a session record from Dynamo DB
Parameters
- $id
string
$id The session ID
Returns
booleanImplementation 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
arrayformatted key structure
Allows the specific strategy to add additional attributes to update
Returns
arrayMethods inherited from Aws\DynamoDb\Session\LockingStrategy\LockingStrategyInterface
Magic methods summary
Properties summary
protected
|
$client |
#
The DynamoDB client |
protected
|
$config |
#
The session handler config options |