NativeBridge
class NativeBridge implements SessionBridgeInterface (View source)
The SessionBridge class.
Methods
Class init.
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 35
__construct()
Class init.
at line line 55
bool
start()
Starts the session.
at line line 93
bool
isStarted()
Checks if the session is started.
at line line 103
string
getId()
Returns the session ID
at line line 115
void
setId(string $id)
Sets the session ID
at line line 125
mixed
getName()
Returns the session name
at line line 137
void
setName(string $name)
Sets the session name
at line line 168
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 201
bool
regenerate(bool $destroy = false)
regenerate
at line line 219
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 232
void
destroy()
Clear all session data in memory.
at line line 250
array
getCookieParams()
getCookieParams
at line line 272
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 284
array
getStorage()
getStorage