SessionBridgeInterface
interface SessionBridgeInterface (View source)
Interface SessionBridgeInterface
Methods
Starts the session.
Checks if the session is started.
Returns the session ID
Sets the session ID
Returns the session name
Sets the session name
Regenerates id that represents this storage.
regenerate
Force the session to be saved and closed.
Clear all session data in memory.
getCookieParams
Set session cookie parameters, this method should call before session started.
getStorage
Details
at line line 25
bool
start()
Starts the session.
at line line 32
bool
isStarted()
Checks if the session is started.
at line line 39
string
getId()
Returns the session ID
at line line 48
void
setId(string $id)
Sets the session ID
at line line 55
mixed
getName()
Returns the session name
at line line 64
void
setName(string $name)
Sets the session name
at line line 87
bool
restart(bool $destroy = false, int $lifetime = null)
Regenerates id that represents this storage.
This method must invoke sessionregenerateid($destroy) unless this interface is used for a storage object designed for unit or functional testing where a real PHP session would interfere with testing.
Note regenerate+destroy should not clear the session data in memory only delete the session data from persistent storage.
at line line 96
bool
regenerate(bool $destroy = false)
regenerate
at line line 111
void
save()
Force the session to be saved and closed.
This method must invoke sessionwriteclose() unless this interface is used for a storage object design for unit or functional testing where a real PHP session would interfere with testing, in which case it it should actually persist the session data if required.
at line line 118
void
destroy()
Clear all session data in memory.
at line line 125
array
getCookieParams()
getCookieParams
at line line 144
SessionBridgeInterface
setCookieParams(integer $lifetime, string $path = null, string $domain = null, boolean $secure = false, boolean $httponly = true)
Set session cookie parameters, this method should call before session started.
at line line 151
array
getStorage()
getStorage