SecureDelegator
in package
implements
HandlerInterface
Secure session delegator
Tags
Interfaces, Classes, Traits and Enums
- HandlerInterface
- Session handler interface
Table of Contents
- $cipher : BlockCipher
- The block cipher for en/decrypting session data.
- $cookieManager : CookieManager
- VuFind cookie manager service.
- $handler : HandlerInterface
- The wrapped session handler.
- __call() : mixed
- Pass calls to non-existing methods to the wrapped Handler
- __construct() : mixed
- SecureDelegator constructor.
- close() : bool
- Closes a session.
- destroy() : bool
- Destroys a session.
- disableWrites() : void
- Disable session writing, i.e. make it read-only
- enableWrites() : void
- Enable session writing (default)
- gc() : int|false
- Performs garbage collection.
- getDbTableManager() : PluginManager
- Get the plugin manager. Throw an exception if it is missing.
- open() : bool
- Opens a session.
- read() : string|false
- Read a sessions data.
- setDbTableManager() : void
- Set the plugin manager.
- write() : bool
- Writes session data.
Properties
$cipher
The block cipher for en/decrypting session data.
protected
BlockCipher
$cipher
$cookieManager
VuFind cookie manager service.
protected
CookieManager
$cookieManager
$handler
The wrapped session handler.
protected
HandlerInterface
$handler
Methods
__call()
Pass calls to non-existing methods to the wrapped Handler
public
__call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
- $name : string
-
Name of the method being called
- $arguments : array<string|int, mixed>
-
Passed Arguments
Return values
mixed —__construct()
SecureDelegator constructor.
public
__construct(CookieManager $cookieManager, HandlerInterface $handler) : mixed
Parameters
- $cookieManager : CookieManager
-
VuFind cookie manager service.
- $handler : HandlerInterface
-
The wrapped session handler.
Return values
mixed —close()
Closes a session.
public
close() : bool
Return values
bool —destroy()
Destroys a session.
public
destroy(string $id) : bool
Parameters
- $id : string
-
Session ID
Return values
bool —disableWrites()
Disable session writing, i.e. make it read-only
public
disableWrites() : void
Return values
void —enableWrites()
Enable session writing (default)
public
enableWrites() : void
Return values
void —gc()
Performs garbage collection.
public
gc(int $max_lifetime) : int|false
Parameters
- $max_lifetime : int
-
Maximum session life time
Return values
int|false —getDbTableManager()
Get the plugin manager. Throw an exception if it is missing.
public
getDbTableManager() : PluginManager
Tags
Return values
PluginManager —open()
Opens a session.
public
open(string $save_path, string $name) : bool
Parameters
- $save_path : string
-
Session save path
- $name : string
-
Session name
Return values
bool —read()
Read a sessions data.
public
read(string $session_id) : string|false
Parameters
- $session_id : string
-
Session id
Return values
string|false —setDbTableManager()
Set the plugin manager.
public
setDbTableManager(PluginManager $manager) : void
Parameters
- $manager : PluginManager
-
Plugin manager
Return values
void —write()
Writes session data.
public
write(string $session_id, string $session_data) : bool
Parameters
- $session_id : string
-
Session id
- $session_data : string
-
Session data