Zeta Components Manual :: Docs For Class ezcPersistentSessionInstance
PersistentObject::ezcPersistentSessionInstance
Class ezcPersistentSessionInstance
Holds persistent object session instances for global access throughout an application.
Typical usage example:
- // retrieve the sessions
Source for this file: /PersistentObject/src/persistent_session_instance.php
Version: | //autogen// |
Method Summary
public static void |
chooseDefault(
$identifier
)
Sets the database $identifier as default database instance. |
public static ezcPersistentSession |
get(
[ $identifier
= null] )
Returns the persistent session instance named $identifier. |
public static void |
reset(
)
Resets the complete class. |
public static void |
resetDefault(
)
Resets the default instance holder. |
public static void |
set(
$session
, [ $identifier
= null] )
Adds the persistent session $session to the list of known instances. |
Methods
chooseDefault
Sets the database $identifier as default database instance.
To retrieve the default database instance call get() with no parameters..
Parameters:
Name | Type | Description |
---|---|---|
$identifier |
string |
get
Returns the persistent session instance named $identifier.
If $identifier is ommited the default persistent session specified by chooseDefault() is returned.
Parameters:
Name | Type | Description |
---|---|---|
$identifier |
string |
Exceptions:
Type | Description |
---|---|
ezcPersistentSessionNotFoundException |
if the specified instance is not found. |
reset
Resets the complete class.
resetDefault
Resets the default instance holder.
set
Adds the persistent session $session to the list of known instances.
If $identifier is specified the persistent session instance can be retrieved later using the same identifier. If $identifier is ommited the default instance will be set.
Parameters:
Name | Type | Description |
---|---|---|
$session |
ezcPersistentSessionFoundation | |
$identifier |
string | the identifier of the database handler |