Class dmitrybtn\yimp\RouteHelper

Inheritancedmitrybtn\yimp\RouteHelper

Provides methods to work with routes

Public Methods

Hide inherited methods

MethodDescriptionDefined 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

match() public static method

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:

  1. site/index mask matches only site/index route
  2. site/login|logout mask matches only site/login and site/logout routes
  3. site/* matches every route, beginning with site/
public static boolean match ( $mask, $route )
$mask string

Mask for checking

$route string

Route to be checked

return boolean

Whether route matches mask

normalize() public static method

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