Interface yii\web\UrlRuleInterface
| Implemented by | yii\ |
|---|---|
| Available since version | 2.0 |
| Source Code | https://github.com/yiisoft/yii2/blob/master/framework/web/UrlRuleInterface.php |
UrlRuleInterface is the interface that should be implemented by URL rule classes.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| createUrl() | Creates a URL according to the given route and parameters. | yii\ |
| parseRequest() | Parses the given request and returns the corresponding route and parameters. | yii\ |
Method Details
Creates a URL according to the given route and parameters.
| public abstract string|boolean createUrl ( yii\ | ||
| $manager | yii\ |
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. |
|---|---|---|
public function createUrl($manager, $route, $params);
Parses the given request and returns the corresponding route and parameters.
| public abstract array|boolean parseRequest ( yii\ | ||
| $manager | yii\ |
The URL manager |
| $request | yii\ |
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. |
|---|---|---|
public function parseRequest($manager, $request);
User Contributed Notes
Leave a comment
Join the conversation to share a note.