PHP Класс Webiny\Component\Bootstrap\Router

Initializes the Router and routes the requests to Dispatcher.
Наследование: use trait Webiny\Component\StdLib\SingletonTrait, use trait Webiny\Component\StdLib\StdObjectTrait, use trait Webiny\Component\Http\HttpTrait, use trait Webiny\Component\Router\RouterTrait
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
initializeRouter ( string $url = null ) : Dispatcher This is the request entry point, once the Bootstrap has been initialized.
mvcRouter ( string $request ) : Dispatcher This is the optional router that routes the MVC requests.

Приватные методы

Метод Описание
dispatchCustom ( string $className, string $action, array $params ) : Dispatcher In case of a custom route, we must use the custom dispatcher.
dispatchMvc ( string $module, string $controller, string $action, array $params ) : Dispatcher Issues the callback using the MVC dispatcher.

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

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

The method initializes router and tries to call the callback assigned to the current url. Method is call automatically from the Bootstrap class.
public initializeRouter ( string $url = null ) : Dispatcher
$url string Url to route. If not set, the current url is used.
Результат Dispatcher

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

This is the optional router that routes the MVC requests.
public mvcRouter ( string $request ) : Dispatcher
$request string Current url path.
Результат Dispatcher