PHP Интерфейс yii\web\UrlRuleInterface

С версии: 2.0
Автор: Qiang Xue ([email protected])
Показать файл Открыть проект

Открытые методы

Метод Описание
createUrl ( UrlManager $manager, string $route, array $params ) : string | boolean Creates a URL according to the given route and parameters.
parseRequest ( UrlManager $manager, Request $request ) : array | boolean Parses the given request and returns the corresponding route and parameters.

Описание методов

createUrl() публичный Метод

Creates a URL according to the given route and parameters.
public createUrl ( UrlManager $manager, string $route, array $params ) : string | boolean
$manager UrlManager the URL manager
$route string the route. It should not have slashes at the beginning or the end.
$params array the parameters
Результат string | boolean the created URL, or false if this rule cannot be used for creating this URL.

parseRequest() публичный Метод

Parses the given request and returns the corresponding route and parameters.
public parseRequest ( UrlManager $manager, Request $request ) : array | boolean
$manager UrlManager the URL manager
$request Request the request component
Результат 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.