Holds persistent object session instances for global access throughout an application.
Typical usage example:
Source for this file: /PersistentObject/src/persistent_session_instance.php
Version: | //autogen// |
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. |
Sets the database $identifier as default database instance.
To retrieve the default database instance call get() with no parameters..
Name | Type | Description |
---|---|---|
$identifier |
string |
Returns the persistent session instance named $identifier.
If $identifier is ommited the default persistent session specified by chooseDefault() is returned.
Name | Type | Description |
---|---|---|
$identifier |
string |
Type | Description |
---|---|
ezcPersistentSessionNotFoundException |
if the specified instance is not found. |
Resets the complete class.
Resets the default instance holder.
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.
Name | Type | Description |
---|---|---|
$session |
ezcPersistentSessionFoundation | |
$identifier |
string | the identifier of the database handler |