PHP 클래스 Ingo_Storage, horde

저자: Jan Schneider ([email protected])
저자: Michael Slusarz ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_params array Configuration parameters.
$_rules array Rules list.

공개 메소드들

메소드 설명
__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.

보호된 메소드들

메소드 설명
_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.

메소드 상세

__construct() 공개 메소드

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

__get() 공개 메소드

public __get ( $name )

_getRule() 보호된 메소드

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

_load() 보호된 메소드

Load the rules.
protected _load ( )

_loadFromBackend() 추상적인 보호된 메소드

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

_removeUserData() 추상적인 보호된 메소드

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

_store() 보호된 메소드

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

_storeBackend() 추상적인 보호된 메소드

Store a rule in the backend.
또한 보기: _store()
abstract protected _storeBackend ( $action, $rule )

addRule() 공개 메소드

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

clearCache() 공개 메소드

Clears the internal rule cache.
public clearCache ( )

copyRule() 공개 메소드

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.
리턴 boolean True if the rule has been found and copied.

count() 공개 메소드

public count ( )

deleteRule() 공개 메소드

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

getIterator() 공개 메소드

public getIterator ( )

getRuleByUid() 공개 메소드

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

getSystemRule() 공개 메소드

Retrieves the specified system rule.
public getSystemRule ( string $rule ) : Ingo_Rule
$rule string The rule name.
리턴 Ingo_Rule A rule object.

maxRules() 공개 메소드

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

removeUserData() 공개 메소드

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

sort() 공개 메소드

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

updateRule() 공개 메소드

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

프로퍼티 상세

$_params 보호되어 있는 프로퍼티

Configuration parameters.
protected array $_params
리턴 array

$_rules 보호되어 있는 프로퍼티

Rules list.
protected array $_rules
리턴 array