STORE_ADD
STORE_ADD
Ingo_Storage defines an API to store the various filter rules.
getSystemRule(string $rule) : \Ingo_Rule
Retrieves the specified system rule.
string | $rule | The rule name. |
A rule object.
addRule(\Ingo_Rule $rule)
Adds a rule to the filters list.
\Ingo_Rule | $rule | A rule object. |
updateRule(\Ingo_Rule $rule)
Updates an existing rule.
\Ingo_Rule | $rule | A rule object. |
deleteRule(\Ingo_Rule $rule) : boolean
Deletes an existing rule.
\Ingo_Rule | $rule | A rule object. |
True if the rule has been found and deleted.
copyRule(\Ingo_Rule $rule) : boolean
Creates a copy of an existing rule.
The created copy is added to the filters list after the original rule.
\Ingo_Rule | $rule | The rule object to copy. |
True if the rule has been found and copied.
getRuleByUid(string $uid) : \Ingo_Rule
Returns a rule given a UID.
string | $uid | Rule UID. |
The rule object (null if not found).
_store(integer $action, \Ingo_Rule $rule = null)
Store a rule.
integer | $action | Storage action. |
\Ingo_Rule | $rule | Rule the action affects. |
_getRule(\Ingo_Rule $rule) : integer
Retrieves a rule.
\Ingo_Rule | $rule | The rule object. |
The key of the rule in the rules list.