Class Ingo_Storage

Description

Ingo_Storage:: defines an API to store the various filter rules.

Located in /lib/Storage.php (line 58)


	
			
Direct descendents
Class Description
 class Ingo_Storage_mock Ingo_Storage_mock:: is used for testing purposes. It just keeps the data local and doesn't put it anywhere.
 class Ingo_Storage_prefs Ingo_Storage_prefs:: implements the Ingo_Storage:: API to save Ingo data via the Horde preferences system.
 class Ingo_Storage_sql Ingo_Storage_sql implements the Ingo_Storage API to save Ingo data via PHP's PEAR database abstraction layer.
Variable Summary
 array $_cache
 array $_params
 boolean $_shutdownCache
Method Summary
 mixed factory ([string $driver = null], [array $params = null])
 stdClass getActionInfo (integer $action)
 stdClass getTestInfo ( $test, string $action)
 mixed removeUserData (string $user)
 Ingo_Storage_rule|Ingo_Storage_filters &retrieve (integer $field, [boolean $cache = true], [boolean $readonly = false])
 boolean store ( &$ob, [boolean $cache = true], Ingo_Storage_rule|Ingo_Storage_filters $ob)
 Ingo_Storage_rule|Ingo_Storage_filters _retrieve (integer $field, [boolean $readonly = false])
Variables
array $_cache = array() (line 72)

Cached rule objects.

array $_params = array() (line 65)

Driver specific parameters.

boolean $_shutdownCache = false (line 79)

Has _addShutdownCache() been called yet?

Methods
factory (line 93)

Attempts to return a concrete Ingo_Storage instance based on $driver.

  • return: The newly created concrete Ingo_Storage instance, or false on an error.
mixed factory ([string $driver = null], [array $params = null])
  • string $driver: The type of concrete Ingo_Storage subclass to return. This is based on the storage driver ($driver). The code is dynamically included.
  • array $params: A hash containing any additional configuration or connection parameters a subclass might need.
getActionInfo (line 270)

Returns information on a given action constant.

  • return: Object with the following values:
     'flags' => (boolean) Does this action allow flags to be set?
     'label' => (string) The label for this action.
     'type'  => (string) Either 'folder', 'text', or empty.
stdClass getActionInfo (integer $action)
  • integer $action: The INGO_STORAGE_ACTION_* value.
getTestInfo (line 338)

Returns information on a given test string.

  • return: Object with the following values:
     'label' => (string) The label for this action.
     'type'  => (string) Either 'int', 'none', or 'text'.
stdClass getTestInfo ( $test, string $action)
  • string $action: The test string.
  • $test
removeUserData (line 400)

Removes the user data from the storage backend.

Stub for child class to override if it can implement.

  • return: True | PEAR_Error
mixed removeUserData (string $user)
  • string $user: The user name to delete filters for.

Redefined in descendants as:
retrieve (line 124)

Retrieves the specified data.

  • return: The specified object.
Ingo_Storage_rule|Ingo_Storage_filters &retrieve (integer $field, [boolean $cache = true], [boolean $readonly = false])
  • integer $field: The field name of the desired data (INGO_STORAGE_ACTION_* constants).
  • boolean $cache: Use the cached object?
  • boolean $readonly: Whether to disable any write operations.
store (line 174)

Stores the specified data.

  • return: True on success.
boolean store ( &$ob, [boolean $cache = true], Ingo_Storage_rule|Ingo_Storage_filters $ob)
_retrieve (line 161)

Retrieves the specified data from the storage backend.

  • return: The specified data.
  • abstract:
Ingo_Storage_rule|Ingo_Storage_filters _retrieve (integer $field, [boolean $readonly = false])
  • integer $field: The field name of the desired data. See lib/Storage.php for the available fields.
  • boolean $readonly: Whether to disable any write operations.

Redefined in descendants as:

Documentation generated on Sun, 30 Jan 2011 05:29:31 +0000 by phpDocumentor 1.4.3