PHP Класс ManaPHP\Mvc\Router

Наследование: extends ManaPHP\Component, implements ManaPHP\Mvc\RouterInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_action string
$_controller string
$_groups array
$_module string
$_modules array
$_params array
$_removeExtraSlashes boolean
$_wasMatched boolean

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

Метод Описание
getActionName ( ) : string Returns the processed action name
getControllerName ( ) : string Returns the processed controller name
getModuleName ( ) : string Returns the processed module name
getModules ( ) : array
getParams ( ) : array Returns the processed parameters
getRewriteUri ( ) : string Get rewrite info. This info is read from $_GET['_url'] or _SERVER["REQUEST_URI"].
handle ( string $uri = null, string $host = null, boolean $silent = true ) : boolean Handles routing information received from the rewrite engine
mount ( string | ManaPHP\Mvc\Router\GroupInterface $group, string $path = null ) : static Mounts a group of routes in the router
removeExtraSlashes ( boolean $remove ) : static Set whether router must remove the extra slashes in the handled routes
wasMatched ( ) : boolean Checks if the router matches any of the defined routes

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

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

Returns the processed action name
public getActionName ( ) : string
Результат string

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

Returns the processed controller name
public getControllerName ( ) : string
Результат string

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

Returns the processed module name
public getModuleName ( ) : string
Результат string

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

public getModules ( ) : array
Результат array

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

Returns the processed parameters
public getParams ( ) : array
Результат array

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

Get rewrite info. This info is read from $_GET['_url'] or _SERVER["REQUEST_URI"].
public getRewriteUri ( ) : string
Результат string

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

Read the info from the rewrite engine $router->handle(); Manually passing an URL $router->handle('/posts/edit/1');
public handle ( string $uri = null, string $host = null, boolean $silent = true ) : boolean
$uri string
$host string
$silent boolean
Результат boolean

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

Mounts a group of routes in the router
public mount ( string | ManaPHP\Mvc\Router\GroupInterface $group, string $path = null ) : static
$group string | ManaPHP\Mvc\Router\GroupInterface
$path string
Результат static

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

Set whether router must remove the extra slashes in the handled routes
public removeExtraSlashes ( boolean $remove ) : static
$remove boolean
Результат static

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

Checks if the router matches any of the defined routes
public wasMatched ( ) : boolean
Результат boolean

Описание свойств

$_action защищенное свойство

protected string $_action
Результат string

$_controller защищенное свойство

protected string $_controller
Результат string

$_groups защищенное свойство

protected array $_groups
Результат array

$_module защищенное свойство

protected string $_module
Результат string

$_modules защищенное свойство

protected array $_modules
Результат array

$_params защищенное свойство

protected array $_params
Результат array

$_removeExtraSlashes защищенное свойство

protected bool $_removeExtraSlashes
Результат boolean

$_wasMatched защищенное свойство

protected bool $_wasMatched
Результат boolean