Class Session
A database powered Session driver. Requires the Record component
Package: minPHP
Subpage:
minPHP.components.session
Located at components/session/session.php
Methods summary
public
|
|
public
|
|
public
string
|
#
getSid( )
Return the session ID
Returns
string The session ID
|
public
mixed
|
#
read( string $name )
Read Session information for the given index
Read Session information for the given index
Parameters
- $name
string $name The name of the index to read
Returns
mixed The value stored in $name of the session, or an empty string.
|
public
|
#
write( string $name, mixed $value )
Writes the given session information to the given index
Writes the given session information to the given index
Parameters
- $name
string $name The index to write to
- $value
mixed $value The value to write
|
public
|
#
clear( string $name = null )
Unsets the value of a given session variable, or the entire session array of
all values
Unsets the value of a given session variable, or the entire session array of
all values
Parameters
- $name
string $name The session variable to unset
|
public
|
#
setSessionCookie( string $path = "", string $domain = "", boolean $secure = false, boolean $httponly = false )
Set the session cookie
Parameters
- $path
string $path The path for this cookie, default is the current URI
- $domain
string $domain The domain that the cookie is available to, default is the current
domain
- $secure
boolean $secure Whether or not the cookie should be transmitted over a secure connection
from the client
- $httponly
boolean $httponly Whether or not the cookie should be flagged for HTTP only
|
public
|
#
keepAliveSessionCookie( string $path = "", string $domain = "", boolean $secure = false, boolean $httponly = false )
Updates the session cookie expiration date so that it remains active without
expiring
Updates the session cookie expiration date so that it remains active without
expiring
Parameters
- $path
string $path The path for this cookie, default is the current URI
- $domain
string $domain The domain that the cookie is available to, default is the current
domain
- $secure
boolean $secure Whether or not the cookie should be transmitted over a secure connection
from the client
- $httponly
boolean $httponly Whether or not the cookie should be flagged for HTTP only
|
public
|
#
clearSessionCookie( string $path = "", string $domain = "", boolean $secure = false )
Deletes the session cookie
Deletes the session cookie
Parameters
- $path
string $path The path for this cookie, default is the current URI
- $domain
string $domain The domain that the cookie is available to, default is the current
domain
- $secure
boolean $secure Whether or not the cookie should be transmitted over a secure connection
from the client
|
Magic methods summary