web\UrlRule init()

init() public method Initializes this rule. public void init ( )

web\UrlRule hasNormalizer()

hasNormalizer() protected method (available since version 2.0.10) protected boolean hasNormalizer ( $manager )$manager yii\web\UrlManager The URL manager

web\UrlRule parseRequest()

parseRequest() public method Parses the given request and returns the corresponding route and parameters. public array|boolean parseRequest ( $manager, $request )$manager yii\web\UrlManager The URL manager $request yii\web\Request The request component return array|boolean The parsing result. The route and the parameters are returned as an array. If false, it means this rule cannot be used to parse this path info.

web\UrlRule substitutePlaceholderNames()

substitutePlaceholderNames() protected method (available since version 2.0.7) Iterates over $placeholders and checks whether each placeholder exists as a key in $matches array. When found - replaces this placeholder key with a appropriate name of matching parameter. Used in parseRequest(), createUrl(). See also $placeholders. protected array substitutePlaceholderNames ( array $matches )$matches array Result of preg_match() call return array Input array with replaced placeholder keys

web\UrlRule $verb

$verb public property The HTTP verb (e.g. GET, POST, DELETE) that this rule should match. Use array to represent multiple verbs that this rule may match. If this property is not set, the rule can match any verb. Note that this property is only used when parsing a request. It is ignored for URL creation. public string|array $verb = null

web\UrlRule createUrl()

createUrl() public method Creates a URL according to the given route and parameters. public string|boolean createUrl ( $manager, $route, $params )$manager yii\web\UrlManager The URL manager $route string The route. It should not have slashes at the beginning or the end. $params array The parameters return string|boolean The created URL, or false if this rule cannot be used for creating this URL.

web\UrlRule getNormalizer()

getNormalizer() protected method (available since version 2.0.10) protected yii\web\UrlNormalizer|null getNormalizer ( $manager )$manager yii\web\UrlManager The URL manager

web\UrlRule getParamRules()

getParamRules() protected method (available since version 2.0.6) Returns list of regex for matching parameter. protected array getParamRules ( )return array Parameter keys and regexp rules.

web\UrlRule $suffix

$suffix public property The URL suffix used for this rule. For example, ".html" can be used so that the URL looks like pointing to a static HTML page. If not, the value of yii\web\UrlManager::$suffix will be used. public string $suffix = null

web\UrlRule $placeholders

$placeholders protected property (available since version 2.0.7) List of placeholders for matching parameters names. Used in parseRequest(), createUrl(). On the rule initialization, the $pattern parameters names will be replaced with placeholders. This array contains relations between the original parameters names and their placeholders. The array keys are the placeholders and the values are the original names. See also: parseRequest() createUrl() protected array $placeholders = []