Class Horde_SessionObjects

Description

The Horde_SessionObjects:: class provides a way for storing data (usually, but not necessarily, objects) in the current user's session.

$Horde: framework/SessionObjects/SessionObjects.php,v 1.6.12.12 2009/01/06 15:23:35 jan Exp $

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If youq did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /SessionObjects/SessionObjects.php (line 18)


	
			
Variable Summary
 string $_name
 boolean $_overwrite
 array $_pruneList
 string $_sdata
 integer $_size
Method Summary
 Horde_SessionObjects Horde_SessionObjects ([array $params = array()])
 string oid (mixed $data)
 boolean overwrite (string $oid, mixed $data, [boolean $prune = true])
 mixed &query (string $oid, [enum $type = null], [integer $val = null])
 void setPruneFlag (string $oid, boolean $prune)
 boolean store (string $oid, mixed $data, [boolean $prune = true])
 string storeOid (mixed $data, [boolean $prune = true])
Variables
string $_name = 'horde_session_objects' (line 32)

The name of the store.

boolean $_overwrite = false (line 39)

Allow store() to overwrite current objects?

array $_pruneList = null (line 25)

The list of oids to prune at the end of a request.

string $_sdata = null (line 53)

Serialized cache item.

integer $_size = 20 (line 46)

The maximum number of objects that the store should hold.

Methods
Constructor Horde_SessionObjects (line 85)

Constructor.

Horde_SessionObjects Horde_SessionObjects ([array $params = array()])
  • array $params: The parameter array.
     Optional Parameters:
     'name'  --  The name of the session variable to store the objects in.
     'size'  --  The maximum size of the (non-prunable) object store.
oid (line 233)

Generates an OID for an object.

  • return: An object ID to use as the storage key.
string oid (mixed $data)
  • mixed $data: The data to store in the store.
overwrite (line 170)

Overwrites a current element in the object store.

  • return: True on success, false on failure.
boolean overwrite (string $oid, mixed $data, [boolean $prune = true])
  • string $oid: Object ID used as the storage key.
  • mixed $data: The data to store in the session store.
  • boolean $prune: If false, this object will not be pruned from the store if the maximum store size is exceeded.
query (line 187)

Attempts to retrive an object from the store.

  • return: The requested object, or false on failure.
mixed &query (string $oid, [enum $type = null], [integer $val = null])
  • string $oid: Object ID to query.
  • enum $type: NOT USED
  • integer $val: NOT USED
setPruneFlag (line 213)

Sets the prune flag on a store object.

void setPruneFlag (string $oid, boolean $prune)
  • string $oid: The object ID.
  • boolean $prune: True to allow pruning, false for no pruning.
singleton (line 64)

Returns a reference to the global Horde_SessionObjects object, only creating it if it doesn't already exist.

This method must be invoked as: $objectstore = &Horde_SessionObjects::singleton();

  • return: The Horde_SessionObjects instance.
Horde_SessionObjects &singleton ()
store (line 126)

Attempts to store an object in the session store.

  • return: True on success, false on failure.
boolean store (string $oid, mixed $data, [boolean $prune = true])
  • string $oid: Object ID used as the storage key.
  • mixed $data: The data to store in the session store.
  • boolean $prune: If false, this object will not be pruned from the store if the maximum store size is exceeded.
storeOid (line 107)

Wrapper around store that will return the oid instead.

string storeOid (mixed $data, [boolean $prune = true])
  • mixed $data: The data to store in the session store.
  • boolean $prune: If false, this object will not be pruned from the store if the maximum store size is exceeded.

Documentation generated on Sun, 30 Jan 2011 05:21:17 +0000 by phpDocumentor 1.4.3