File
class File implements StoreInterface
File store.
Properties
protected FileSystem | $fileSystem | File system instance. | |
protected string | $sessionPath | Session path. | |
protected array|bool | $classWhitelist | Class whitelist. |
Methods
__construct(FileSystem $fileSystem, string $sessionPath, array|bool $classWhitelist = false)
Constructor.
string
sessionFile(string $sessionId)
Returns the path to the session file.
write(string $sessionId, array $sessionData, int $dataTTL)
Writes session data.
array
read(string $sessionId)
Reads and returns session data.
delete(string $sessionId)
Destroys the session data assiciated with the provided id.
gc(int $dataTTL)
Garbage collector that deletes expired session data.
Details
at line 50
__construct(FileSystem $fileSystem, string $sessionPath, array|bool $classWhitelist = false)
Constructor.
at line 65
protected string
sessionFile(string $sessionId)
Returns the path to the session file.
at line 73
write(string $sessionId, array $sessionData, int $dataTTL)
Writes session data.
at line 84
array
read(string $sessionId)
Reads and returns session data.
at line 99
delete(string $sessionId)
Destroys the session data assiciated with the provided id.
at line 110
gc(int $dataTTL)
Garbage collector that deletes expired session data.