Static Public Member Functions | Static Protected Attributes

RewriteRules Class Reference

List of all members.

Static Public Member Functions

static add_system_rules ($rules)
static get_active ()
static sort_rules ($rewrite_rules)
static by_name ($name)

Static Protected Attributes

static $sorted_rules_cache = null

Detailed Description

Class for storing and retrieving rewrite rules from the DB.

Definition at line 12 of file rewriterules.php.


Member Function Documentation

static RewriteRules::add_system_rules ( rules  )  [static]

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

Parameters:
array $rules An array of RewriteRule objects
Returns:
array An array of rules with the system rules potentially added

Definition at line 23 of file rewriterules.php.

Referenced by get_active().

static RewriteRules::by_name ( name  )  [static]

Get a RewriteRule by its name

Parameters:
string $name The name of the rule
Returns:
array An array of all matched RewriteRule objects.

Definition at line 188 of file rewriterules.php.

Referenced by URL::set_404().

static RewriteRules::get_active (  )  [static]

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

Returns:
array Array of RewriteRule objects for active rewrite rules

Definition at line 130 of file rewriterules.php.

Referenced by by_name().

static RewriteRules::sort_rules ( rewrite_rules  )  [static]

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.

Parameters:
array $rewrite_rules An array of RewriteRules
Returns:
array Sorted rewrite rules by priority

Definition at line 164 of file rewriterules.php.

Referenced by get_active().


The documentation for this class was generated from the following file: