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

array $rules An array of RewriteRule objects
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

string $name The name of the rule
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

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.

array $rewrite_rules An array of RewriteRules
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: