PHP Class ManaPHP\Mvc\Router

Inheritance: extends ManaPHP\Component, implements ManaPHP\Mvc\RouterInterface
Afficher le fichier Open project: manaphp/manaphp

Protected Properties

Свойство Type Description
$_action string
$_controller string
$_groups array
$_module string
$_modules array
$_params array
$_removeExtraSlashes boolean
$_wasMatched boolean

Méthodes publiques

Méthode Description
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

Method Details

getActionName() public méthode

Returns the processed action name
public getActionName ( ) : string
Résultat string

getControllerName() public méthode

Returns the processed controller name
public getControllerName ( ) : string
Résultat string

getModuleName() public méthode

Returns the processed module name
public getModuleName ( ) : string
Résultat string

getModules() public méthode

public getModules ( ) : array
Résultat array

getParams() public méthode

Returns the processed parameters
public getParams ( ) : array
Résultat array

getRewriteUri() public méthode

Get rewrite info. This info is read from $_GET['_url'] or _SERVER["REQUEST_URI"].
public getRewriteUri ( ) : string
Résultat string

handle() public méthode

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
Résultat boolean

mount() public méthode

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
Résultat static

removeExtraSlashes() public méthode

Set whether router must remove the extra slashes in the handled routes
public removeExtraSlashes ( boolean $remove ) : static
$remove boolean
Résultat static

wasMatched() public méthode

Checks if the router matches any of the defined routes
public wasMatched ( ) : boolean
Résultat boolean

Property Details

$_action protected_oe property

protected string $_action
Résultat string

$_controller protected_oe property

protected string $_controller
Résultat string

$_groups protected_oe property

protected array $_groups
Résultat array

$_module protected_oe property

protected string $_module
Résultat string

$_modules protected_oe property

protected array $_modules
Résultat array

$_params protected_oe property

protected array $_params
Résultat array

$_removeExtraSlashes protected_oe property

protected bool $_removeExtraSlashes
Résultat boolean

$_wasMatched protected_oe property

protected bool $_wasMatched
Résultat boolean