Class RewriteRules

Description

Class for storing and retrieving rewrite rules from the DB.

Located in /system/classes/rewriterules.php (line 6)

ArrayObject
   |
   --RewriteRules
Method Summary
static array add_system_rules (array $rules)
static RewriteRule by_name (string $name)
static array get_active ()
static array sort_rules (array $rewrite_rules)
Methods
static method add_system_rules (line 14)

Add pre-defined rules to an array of rules only if rules with their names don't already exist

  • return: An array of rules with the system rules potentially added
  • access: public
static array add_system_rules (array $rules)
  • array $rules: An array of RewriteRule objects
static method by_name (line 133)

Get a RewriteRule by its name

  • return: The rule requested
  • todo: Make this return more than one rule when more than one rule matches.
  • access: public
static RewriteRule by_name (string $name)
  • string $name: The name of the rule
static method get_active (line 76)

Return the active rewrite rules, both in the database and applied by plugins

  • return: Array of RewriteRule objects for active rewrite rules
  • access: public
static array get_active ()
static method sort_rules (line 108)

Helper function for sorting rewrite rules by priority.

Required because plugins would insert their rules at the end of the array, which would allow any other rule (including the one that executes by default when no other rules work) to execute first.

  • return: Sorted rewrite rules by priority
  • access: public
static array sort_rules (array $rewrite_rules)
  • array $rewrite_rules: An array of RewriteRules

Inherited Methods

Inherited From ArrayObject (Internal Class)

constructor __construct ( $array )
append ( $value )
asort ( )
count ( )
exchangeArray ( $array )
getArrayCopy ( )
getFlags ( )
getIterator ( )
getIteratorClass ( )
ksort ( )
natcasesort ( )
natsort ( )
offsetExists ( $index )
offsetGet ( $index )
offsetSet ( $index, $newval )
offsetUnset ( $index )
setFlags ( $flags )
setIteratorClass ( $iteratorClass )
uasort ( $cmp_function )
uksort ( $cmp_function )
Class Constants

Inherited Constants

Inherited from ArrayObject (Internal Class)

ARRAY_AS_PROPS = 2
STD_PROP_LIST = 1

Documentation generated on Thu, 30 Oct 2008 20:31:25 +0100 by phpDocumentor 1.3.2