Class CUrlRule
CUrlRule represents a URL formatting/parsing rule.
It mainly consists of two parts: route and pattern. The former classifies the rule so that it only applies to specific controller-action route. The latter performs the actual formatting and parsing role. The pattern may have a set of named parameters.
- CComponent
- CBaseUrlRule
- CUrlRule
Direct known subclasses
X2UrlRuleCopyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/web/CUrlManager.php
public
|
|
public
mixed
|
#
createUrl(
Creates a URL based on this rule. |
public
mixed
|
#
parseUrl(
Parses a URL based on this rule. |
public
string
|
$urlSuffix |
|
#
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. Defaults to null, meaning
using the value of |
public
boolean
|
$caseSensitive |
|
#
whether the rule is case sensitive. Defaults to null, meaning using the value
of |
public
array
|
$defaultParams | array() |
#
the default GET parameters (name=>value) that this rule provides. When this rule is used to parse the incoming request, the values declared in this property will be injected into $_GET. |
public
boolean
|
$matchValue |
|
#
whether the GET parameter values should match the corresponding sub-patterns
in the rule when creating a URL. Defaults to null, meaning using the value of
|
public
string
|
$verb |
|
#
the HTTP verb (e.g. GET, POST, DELETE) that this rule should match. If this rule can match multiple verbs, please separate them with commas. 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
boolean
|
$parsingOnly | false |
#
whether this rule is only used for request parsing. Defaults to false, meaning the rule is used for both URL parsing and creation. |
public
string
|
$route |
|
#
the controller/action pair |
public
array
|
$references | array() |
#
the mapping from route param name to token name (e.g. _r1=><1>) |
public
string
|
$routePattern |
|
#
the pattern used to match route |
public
string
|
$pattern |
|
#
regular expression used to parse a URL |
public
string
|
$template |
|
#
template used to construct a URL |
public
array
|
$params | array() |
#
list of parameters (name=>regular expression) |
public
boolean
|
$append |
|
#
whether the URL allows additional parameters at the end of the path info. |
public
boolean
|
$hasHostInfo |
|
#
whether host info should be considered for this rule |