Class Ingo_Storage_filters_sql

Description

Ingo_Storage_filters_sql is the object used to hold user-defined filtering rule information.

Located in /lib/Storage/sql.php (line 446)

Ingo_Storage_filters
   |
   --Ingo_Storage_filters_sql
Variable Summary
 DB $_db
 array $_params
Method Summary
 Ingo_Storage_filters_sql Ingo_Storage_filters_sql (DB $db, DB $write_db, array $params)
 void addRule (array $rule, [boolean $default = true])
 boolean copyRule (integer $id)
 boolean deleteRule (integer $id)
 void init ([boolean $readonly = false])
 void ruleDisable (integer $id)
 void ruleDown (integer $id, [integer $steps = 1])
 void ruleEnable (integer $id)
 void ruleUp (integer $id, [integer $steps = 1])
 void updateRule (array $rule, integer $id)
 void _ruleMove (integer $id, integer $steps)
 array _ruleToBackend (array $rule)
Variables
DB $_db (line 453)

Handle for the current database connection.

array $_params (line 470)

Driver specific parameters.

DB $_write_db (line 463)

Handle for the current database connection, used for writing.

Defaults to the same handle as $_db if a separate write database is not required.

Inherited Variables

Inherited from Ingo_Storage_filters

Ingo_Storage_filters::$_filters
Ingo_Storage_filters::$_obtype
Methods
Constructor Ingo_Storage_filters_sql (line 480)

Constructor.

Ingo_Storage_filters_sql Ingo_Storage_filters_sql (DB $db, DB $write_db, array $params)
  • DB $db: Handle for the database connection.
  • DB $write_db: Handle for the database connection, used for writing.
  • array $params: Driver specific parameters.
addRule (line 577)

Adds a rule hash to the filters list.

void addRule (array $rule, [boolean $default = true])
  • array $rule: A rule hash.
  • boolean $default: If true merge the rule hash with default rule values.

Redefinition of:
Ingo_Storage_filters::addRule()
Adds a rule hash to the filters list.
copyRule (line 674)

Creates a copy of an existing rule.

The created copy is added to the filters list right after the original rule.

  • return: True if the rule has been found and copied.
boolean copyRule (integer $id)
  • integer $id: Number of the rule to copy.

Redefinition of:
Ingo_Storage_filters::copyRule()
Creates a copy of an existing rule.
deleteRule (line 633)

Deletes a rule from the filters list.

  • return: True if the rule has been found and deleted.
boolean deleteRule (integer $id)
  • integer $id: Number of the rule to delete.

Redefinition of:
Ingo_Storage_filters::deleteRule()
Deletes a rule from the filters list.
init (line 492)

Loads all rules from the DB backend.

void init ([boolean $readonly = false])
  • boolean $readonly: Whether to disable any write operations.
ruleDisable (line 759)

Disables a rule.

void ruleDisable (integer $id)
  • integer $id: Number of the rule to disable.

Redefinition of:
Ingo_Storage_filters::ruleDisable()
Disables a rule.
ruleDown (line 704)

Moves a rule down in the filters list.

void ruleDown (integer $id, [integer $steps = 1])
  • integer $id: Number of the rule to move.
  • integer $steps: Number of positions to move the rule down.

Redefinition of:
Ingo_Storage_filters::ruleDown()
Moves a rule down in the filters list.
ruleEnable (line 771)

Enables a rule.

void ruleEnable (integer $id)
  • integer $id: Number of the rule to enable.

Redefinition of:
Ingo_Storage_filters::ruleEnable()
Enables a rule.
ruleUp (line 693)

Moves a rule up in the filters list.

void ruleUp (integer $id, [integer $steps = 1])
  • integer $id: Number of the rule to move.
  • integer $steps: Number of positions to move the rule up.

Redefinition of:
Ingo_Storage_filters::ruleUp()
Moves a rule up in the filters list.
updateRule (line 610)

Updates an existing rule with a rule hash.

void updateRule (array $rule, integer $id)
  • array $rule: A rule hash
  • integer $id: A rule number

Redefinition of:
Ingo_Storage_filters::updateRule()
Updates an existing rule with a rule hash.
_ruleMove (line 716)

Moves a rule in the filters list.

void _ruleMove (integer $id, integer $steps)
  • integer $id: Number of the rule to move.
  • integer $steps: Number of positions and direction to move the rule.
_ruleToBackend (line 558)

Converts a rule hash from Ingo's internal format to the database format.

  • return: Rule hash in DB's format.
array _ruleToBackend (array $rule)
  • array $rule: Rule hash in Ingo's format.

Inherited Methods

Inherited From Ingo_Storage_filters

 Ingo_Storage_filters::addRule()
 Ingo_Storage_filters::copyRule()
 Ingo_Storage_filters::deleteRule()
 Ingo_Storage_filters::findRule()
 Ingo_Storage_filters::findRuleId()
 Ingo_Storage_filters::getDefaultRule()
 Ingo_Storage_filters::getFilterlist()
 Ingo_Storage_filters::getRule()
 Ingo_Storage_filters::obType()
 Ingo_Storage_filters::ruleDisable()
 Ingo_Storage_filters::ruleDown()
 Ingo_Storage_filters::ruleEnable()
 Ingo_Storage_filters::ruleUp()
 Ingo_Storage_filters::setFilterlist()
 Ingo_Storage_filters::updateRule()

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