Abstract Class yii\web\CompositeUrlRule
Inheritance | yii\web\CompositeUrlRule » yii\base\BaseObject |
---|---|
Implements | yii\base\Configurable, yii\web\UrlRuleInterface |
Subclasses | yii\rest\UrlRule, yii\web\GroupUrlRule |
Available since version | 2.0 |
Source Code | https://github.com/yiisoft/yii2/blob/master/framework/web/CompositeUrlRule.php |
CompositeUrlRule is the base class for URL rule classes that consist of multiple simpler rules.
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$createStatus | integer|null | Status of the URL creation after the last createUrl() call. | yii\web\CompositeUrlRule |
$rules | yii\web\UrlRuleInterface[] | The URL rules contained in this composite rule. | yii\web\CompositeUrlRule |
Public Methods
Method | Description | Defined By |
---|---|---|
__call() | Calls the named method which is not a class method. | yii\base\BaseObject |
__construct() | Constructor. | yii\base\BaseObject |
__get() | Returns the value of an object property. | yii\base\BaseObject |
__isset() | Checks if a property is set, i.e. defined and not null. | yii\base\BaseObject |
__set() | Sets value of an object property. | yii\base\BaseObject |
__unset() | Sets an object property to null. | yii\base\BaseObject |
canGetProperty() | Returns a value indicating whether a property can be read. | yii\base\BaseObject |
canSetProperty() | Returns a value indicating whether a property can be set. | yii\base\BaseObject |
className() | Returns the fully qualified name of this class. | yii\base\BaseObject |
createUrl() | {@inheritdoc} | yii\web\CompositeUrlRule |
getCreateUrlStatus() | Returns status of the URL creation after the last createUrl() call. | yii\web\CompositeUrlRule |
hasMethod() | Returns a value indicating whether a method is defined. | yii\base\BaseObject |
hasProperty() | Returns a value indicating whether a property is defined. | yii\base\BaseObject |
init() | {@inheritdoc} | yii\web\CompositeUrlRule |
parseRequest() | {@inheritdoc} | yii\web\CompositeUrlRule |
Protected Methods
Method | Description | Defined By |
---|---|---|
createRules() | Creates the URL rules that should be contained within this composite rule. | yii\web\CompositeUrlRule |
iterateRules() | Iterates through specified rules and calls createUrl() for each of them. | yii\web\CompositeUrlRule |
Property Details
Status of the URL creation after the last createUrl() call.
The URL rules contained in this composite rule. This property is set in init() by the return value of createRules().
Method Details
Creates the URL rules that should be contained within this composite rule.
protected abstract yii\web\UrlRuleInterface[] createRules ( ) | ||
return | yii\web\UrlRuleInterface[] | The URL rules |
---|
{@inheritdoc}
public void createUrl ( $manager, $route, $params ) | ||
$manager | ||
$route | ||
$params |
Returns status of the URL creation after the last createUrl() call.
For multiple rules statuses will be combined by bitwise or
operator
(e.g. UrlRule::CREATE_STATUS_PARSING_ONLY | UrlRule::CREATE_STATUS_PARAMS_MISMATCH
).
See also:
public null|integer getCreateUrlStatus ( ) | ||
return | null|integer | Status of the URL creation after the last createUrl() call. |
---|
{@inheritdoc}
public void init ( ) |
Iterates through specified rules and calls createUrl() for each of them.
See also createUrl().
protected boolean|string iterateRules ( $rules, $manager, $route, $params ) | ||
$rules | yii\web\UrlRuleInterface[] | Rules to iterate. |
$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 | boolean|string | The created URL, or |
---|
{@inheritdoc}
public void parseRequest ( $manager, $request ) | ||
$manager | ||
$request |