The Horde_Session_Null:: class provides a set of methods for handling the
administration and contents of the Horde session variable when the PHP
session is not desired. Needed so things like application authentication can
work within a single HTTP request when we don't need the overhead of a
full PHP session.
Copyright 2010-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
Methods summary
public
|
|
public
|
#
setup( boolean $start = true, string $cache_limiter = null, string $session_id = null )
Sets a custom session handler up, if there is one.
Sets a custom session handler up, if there is one.
Parameters
- $start
- Initiate the session?
- $cache_limiter
- <p>Override for the session cache limiter
value.</p>
- $session_id
- The session ID to use.
Throws
Horde_Exception
Overrides
|
public
|
#
start( )
Starts the session.
Since
1.4.0
Overrides
|
public
boolean
|
#
clean( )
Destroys any existing session on login and make sure to use a new
session ID, to avoid session fixation issues. Should be called before
checking a login.
Destroys any existing session on login and make sure to use a new
session ID, to avoid session fixation issues. Should be called before
checking a login.
Returns
boolean True if the session was cleaned.
Overrides
|
public
|
#
close( )
Close the current session.
Close the current session.
Overrides
|
public
|
#
destroy( )
Destroy session data.
Overrides
|
public
boolean
|
#
isActive( )
Is the current session active (read/write)?
Is the current session active (read/write)?
Returns
boolean True if the current session is active.
Overrides
|
public
boolean
|
#
exists( string $app, string $name )
Does the session variable exist?
Does the session variable exist?
Parameters
- $app
- Application name.
- $name
- Session variable name.
Returns
boolean True if session variable exists.
Overrides
|
public
mixed
|
#
get( string $app, string $name, integer $mask = 0 )
Get the value of a session variable.
Get the value of a session variable.
Parameters
- $app
- Application name.
- $name
- Session variable name.
- $mask
- <p>One of:
- self::TYPE_ARRAY - Return an array value.
- self::TYPE_OBJECT - Return an object value.</p>
Returns
mixed The value or null if the value doesn't exist.
Overrides
|
public
|
#
set( string $app, string $name, mixed $value, integer $mask = 0 )
Sets the value of a session variable.
Sets the value of a session variable.
Parameters
- $app
- Application name.
- $name
- Session variable name.
- $value
- Session variable value.
- $mask
- <p>One of:
- self::TYPE_ARRAY - Force save as an array value.
- self::TYPE_OBJECT - Force save as an object value.</p>
Overrides
|
public
|
#
remove( string $app, string $name = null )
Remove session key(s).
Parameters
- $app
- Application name.
- $name
- Session variable name.
Overrides
|
public
string
|
#
store( mixed $data, boolean $prune = true, string $id = null )
Store an arbitrary piece of data in the session.
Store an arbitrary piece of data in the session.
Parameters
- $data
- Data to save.
- $prune
- Is data pruneable?
- $id
- ID to use (otherwise, is autogenerated).
Returns
string The session storage id (used to retrieve session data).
Overrides
|
public
mixed
|
#
retrieve( string $id )
Retrieve data from the session data store (created via store()).
Retrieve data from the session data store (created via store()).
Parameters
Returns
mixed The session data value.
Overrides
|
public
|
#
purge( string $id )
Purge data from the session data store (created via store()).
Purge data from the session data store (created via store()).
Parameters
Overrides
|