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 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 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 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 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 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 $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 $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 $route

$route public property The route to the controller action public string $route = null