PHP Class Ingo_Storage, horde

Author: Jan Schneider ([email protected])
Author: Michael Slusarz ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_params array Configuration parameters.
$_rules array Rules list.

Méthodes publiques

Méthode Description
__construct ( array $params = [] ) Constructor.
__get ( $name )
addRule ( Ingo_Rule $rule ) Adds a rule to the filters list.
clearCache ( ) Clears the internal rule cache.
copyRule ( Ingo_Rule $rule ) : boolean Creates a copy of an existing rule.
count ( )
deleteRule ( Ingo_Rule $rule ) : boolean Deletes an existing rule.
getIterator ( )
getRuleByUid ( string $uid ) : Ingo_Rule Returns a rule given a UID.
getSystemRule ( string $rule ) : Ingo_Rule Retrieves the specified system rule.
maxRules ( ) : integer Has the maximum number of rules been reached?
removeUserData ( string $user ) Removes the user data from the storage backend.
sort ( array $rules ) Sorts the list of rules in the given order.
updateRule ( Ingo_Rule $rule ) Updates an existing rule.

Méthodes protégées

Méthode Description
_getRule ( Ingo_Rule $rule ) : integer Retrieves a rule.
_load ( ) Load the rules.
_loadFromBackend ( ) Load the rules from the storage backend.
_removeUserData ( string $user ) Removes the user data from the storage backend.
_store ( integer $action, Ingo_Rule $rule = null ) Store a rule.
_storeBackend ( $action, $rule ) Store a rule in the backend.

Method Details

__construct() public méthode

Constructor.
public __construct ( array $params = [] )
$params array

__get() public méthode

public __get ( $name )

_getRule() protected méthode

Retrieves a rule.
protected _getRule ( Ingo_Rule $rule ) : integer
$rule Ingo_Rule The rule object.
Résultat integer The key of the rule in the rules list.

_load() protected méthode

Load the rules.
protected _load ( )

_loadFromBackend() abstract protected méthode

Load the rules from the storage backend.
abstract protected _loadFromBackend ( )

_removeUserData() abstract protected méthode

Removes the user data from the storage backend.
abstract protected _removeUserData ( string $user )
$user string The user name to delete filters for.

_store() protected méthode

Store a rule.
protected _store ( integer $action, Ingo_Rule $rule = null )
$action integer Storage action.
$rule Ingo_Rule Rule the action affects.

_storeBackend() abstract protected méthode

Store a rule in the backend.
See also: _store()
abstract protected _storeBackend ( $action, $rule )

addRule() public méthode

Adds a rule to the filters list.
public addRule ( Ingo_Rule $rule )
$rule Ingo_Rule A rule object.

clearCache() public méthode

Clears the internal rule cache.
public clearCache ( )

copyRule() public méthode

The created copy is added to the filters list after the original rule.
public copyRule ( Ingo_Rule $rule ) : boolean
$rule Ingo_Rule The rule object to copy.
Résultat boolean True if the rule has been found and copied.

count() public méthode

public count ( )

deleteRule() public méthode

Deletes an existing rule.
public deleteRule ( Ingo_Rule $rule ) : boolean
$rule Ingo_Rule A rule object.
Résultat boolean True if the rule has been found and deleted.

getIterator() public méthode

public getIterator ( )

getRuleByUid() public méthode

Returns a rule given a UID.
public getRuleByUid ( string $uid ) : Ingo_Rule
$uid string Rule UID.
Résultat Ingo_Rule The rule object (null if not found).

getSystemRule() public méthode

Retrieves the specified system rule.
public getSystemRule ( string $rule ) : Ingo_Rule
$rule string The rule name.
Résultat Ingo_Rule A rule object.

maxRules() public méthode

Has the maximum number of rules been reached?
public maxRules ( ) : integer
Résultat integer A MAX_* constant. Non-zero indicates rule cannot be added.

removeUserData() public méthode

Removes the user data from the storage backend.
public removeUserData ( string $user )
$user string The user name to delete filters for.

sort() public méthode

Sorts the list of rules in the given order.
public sort ( array $rules )
$rules array Sorted list of rule UIDs.

updateRule() public méthode

Updates an existing rule.
public updateRule ( Ingo_Rule $rule )
$rule Ingo_Rule A rule object.

Property Details

$_params protected_oe property

Configuration parameters.
protected array $_params
Résultat array

$_rules protected_oe property

Rules list.
protected array $_rules
Résultat array