\Symfony\Component\HttpFoundation\Session\Storage\HandlerWriteCheckSessionHandler

Wraps another SessionHandlerInterface to only write the session when it has been modified.

Summary

Methods
Properties
Constants
__construct()
close()
destroy()
gc()
open()
read()
write()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$wrappedSessionHandler
$readSessions
N/A

Properties

$readSessions

$readSessions : array

Type

array — sessionId => session

Methods

__construct()

__construct(\SessionHandlerInterface  $wrappedSessionHandler) 

Parameters

\SessionHandlerInterface $wrappedSessionHandler

close()

close() : boolean

Closes the current session.

Returns

boolean —

true on success, false on failure

destroy()

destroy(string  $sessionId) : boolean

Destroys a session.

Parameters

string $sessionId

Session ID, see http://php.net/function.session-id

Returns

boolean —

true on success, false on failure

gc()

gc(string|integer  $maxlifetime) : boolean

Cleans up expired sessions (garbage collection).

Parameters

string|integer $maxlifetime

Sessions that have not updated for the last maxlifetime seconds will be removed

Returns

boolean —

true on success, false on failure

open()

open(string  $savePath, string  $sessionName) : boolean

Re-initializes existing session, or creates a new one.

Parameters

string $savePath

Save path

string $sessionName

Session name, see http://php.net/function.session-name.php

Returns

boolean —

true on success, false on failure

read()

read(string  $sessionId) : string

Reads the session data.

Parameters

string $sessionId

Session ID, see http://php.net/function.session-id

Returns

string —

Same session data as passed in write() or empty string when non-existent or on failure

write()

write(string  $sessionId, string  $data) : boolean

Writes the session data to the storage.

Care, the session ID passed to write() can be different from the one previously received in read() when the session ID changed due to session_regenerate_id().

Parameters

string $sessionId

Session ID , see http://php.net/function.session-id

string $data

Serialized session data to save

Returns

boolean —

true on success, false on failure