Class dmitrybtn\yimp\RouteHelper
| Inheritance | dmitrybtn\yimp\RouteHelper |
|---|
Provides methods to work with routes
Public Methods
| Method | Description | Defined By |
|---|---|---|
| match() | Checks if route matches the mask | dmitrybtn\yimp\RouteHelper |
| normalize() | Overrides yii\helpers\BaseUrl::normalizeRoute to make it public. | dmitrybtn\yimp\RouteHelper |
Method Details
Checks if route matches the mask
Route and mask are exploded by / delimiter and then compared part by part. Mask can be one of the following:
site/indexmask matches onlysite/indexroutesite/login|logoutmask matches onlysite/loginandsite/logoutroutessite/*matches every route, beginning withsite/
| public static boolean match ( $mask, $route ) | ||
| $mask | string | Mask for checking |
| $route | string | Route to be checked |
| return | boolean | Whether route matches mask |
|---|---|---|
Overrides yii\helpers\BaseUrl::normalizeRoute to make it public.
| public static string normalize ( $route ) | ||
| $route | String The route. This can be either an absolute route or a relative route. |
|
| return | string | Normalized route suitable for UrlManager |
|---|---|---|