PHP Класс Habari\RewriteRules

Наследование: extends ArrayObject
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$sorted_rules_cache cache sorted rules

Открытые методы

Метод Описание
add_system_rules ( array $rules ) : array Add pre-defined rules to an array of rules only if rules with their names don't already exist
by_name ( string $name ) : array Get a RewriteRule by its name
get_active ( ) : array Return the active rewrite rules, both in the database and applied by plugins
sort_rules ( array $rewrite_rules ) : array Helper function for sorting rewrite rules by priority.

Описание методов

add_system_rules() публичный статический Метод

Add pre-defined rules to an array of rules only if rules with their names don't already exist
public static add_system_rules ( array $rules ) : array
$rules array An array of RewriteRule objects
Результат array An array of rules with the system rules potentially added

by_name() публичный статический Метод

Get a RewriteRule by its name
public static by_name ( string $name ) : array
$name string The name of the rule
Результат array An array of all matched RewriteRule objects.

get_active() публичный статический Метод

Return the active rewrite rules, both in the database and applied by plugins
public static get_active ( ) : array
Результат array Array of RewriteRule objects for active rewrite rules

sort_rules() публичный статический Метод

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.
public static sort_rules ( array $rewrite_rules ) : array
$rewrite_rules array An array of RewriteRules
Результат array Sorted rewrite rules by priority

Описание свойств

$sorted_rules_cache защищенное статическое свойство

cache sorted rules
protected static $sorted_rules_cache