RouteInfo
in package
Route Information Class
Table of Contents
Properties
- $allowed_methods : mixed
- $controller_object : BasePage|null
- $dispatcher_info : array<string|int, mixed>
- $handler : mixed
- $http_method : string
- $rewrite : int|null
- $route : string
- $route_name : string|null
- $status : int
- $type : string|null
- $uri : string
- $vars : mixed
Methods
- __construct() : mixed
- class constructor
- getAllowedMethods() : mixed
- get allowed methods
- getControllerObject() : BasePage|null
- gets controller object
- getData() : array<string|int, mixed>
- gets RouteInfo data
- getDispatcherInfo() : array<string|int, mixed>
- gets dispatcher info
- getHandler() : mixed
- gets handler to call
- getHttpMethod() : string
- gets http method
- getRewrite() : int|null
- gets rewrite
- getRoute() : string
- gets route
- getRouteName() : string|null
- gets route name
- getStatus() : int
- gets status
- getType() : int|null
- gets type
- getUri() : string
- gets uri
- getVar() : mixed
- get router var by name
- getVars() : mixed
- get router vars
- isAdminRoute() : bool
- checks if route is administrative route
- setAllowedMethods() : self
- sets allowed methods
- setControllerObject() : self
- sets controller object
- setDispatcherInfo() : self
- sets dispatcher info
- setHandler() : self
- sets handler to call
- setHttpMethod() : self
- sets http method
- setRewrite() : self
- sets rewrite
- setRoute() : self
- sets route
- setRouteName() : self
- sets route name
- setStatus() : self
- sets status
- setType() : self
- sets type
- setUri() : self
- sets uri
- setVars() : self
- set router vars
- toString() : string
- {@inheritdoc}
- worksOffline() : bool
- checks if route works also if site is offline
Properties
$allowed_methods
protected
mixed
$allowed_methods
allowed methods
$controller_object
protected
BasePage|null
$controller_object
= null
controller object instance
$dispatcher_info
protected
array<string|int, mixed>
$dispatcher_info
dispatcher info
$handler
protected
mixed
$handler
handler to invoke
$http_method
protected
string
$http_method
http method
$rewrite
protected
int|null
$rewrite
rewrite id
$route
protected
string
$route
route
$route_name
protected
string|null
$route_name
route name
$status
protected
int
$status
dispatcher status
$type
protected
string|null
$type
type
$uri
protected
string
$uri
uri
$vars
protected
mixed
$vars
vars
Methods
__construct()
class constructor
public
__construct(array<string|int, mixed> $dispatcher_info, string $http_method, string $uri, string $route[, string|null $route_name = null ][, int|null $rewrite = null ][, mixed $type = null ]) : mixed
Parameters
- $dispatcher_info : array<string|int, mixed>
- $http_method : string
- $uri : string
- $route : string
- $route_name : string|null = null
- $rewrite : int|null = null
- $type : mixed = null
getAllowedMethods()
get allowed methods
public
getAllowedMethods() : mixed
getControllerObject()
gets controller object
public
getControllerObject() : BasePage|null
Return values
BasePage|null —controller object instance
getData()
gets RouteInfo data
public
getData() : array<string|int, mixed>
Return values
array<string|int, mixed>getDispatcherInfo()
gets dispatcher info
public
getDispatcherInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>getHandler()
gets handler to call
public
getHandler() : mixed
getHttpMethod()
gets http method
public
getHttpMethod() : string
Return values
stringgetRewrite()
gets rewrite
public
getRewrite() : int|null
Return values
int|nullgetRoute()
gets route
public
getRoute() : string
Return values
stringgetRouteName()
gets route name
public
getRouteName() : string|null
Return values
string|nullgetStatus()
gets status
public
getStatus() : int
Return values
intgetType()
gets type
public
getType() : int|null
Return values
int|nullgetUri()
gets uri
public
getUri() : string
Return values
stringgetVar()
get router var by name
public
getVar(string $name) : mixed
Parameters
- $name : string
getVars()
get router vars
public
getVars() : mixed
isAdminRoute()
checks if route is administrative route
public
isAdminRoute() : bool
Return values
boolsetAllowedMethods()
sets allowed methods
public
setAllowedMethods(mixed $allowed_methods) : self
Parameters
- $allowed_methods : mixed
Return values
selfsetControllerObject()
sets controller object
public
setControllerObject(BasePage $controller_object) : self
Parameters
- $controller_object : BasePage
Return values
selfsetDispatcherInfo()
sets dispatcher info
public
setDispatcherInfo(array<string|int, mixed> $dispatcher_info) : self
Parameters
- $dispatcher_info : array<string|int, mixed>
Return values
selfsetHandler()
sets handler to call
public
setHandler(callable $handler) : self
Parameters
- $handler : callable
Return values
selfsetHttpMethod()
sets http method
public
setHttpMethod(string $http_method) : self
Parameters
- $http_method : string
Return values
selfsetRewrite()
sets rewrite
public
setRewrite(int $rewrite) : self
Parameters
- $rewrite : int
Return values
selfsetRoute()
sets route
public
setRoute(string $route) : self
Parameters
- $route : string
Return values
selfsetRouteName()
sets route name
public
setRouteName(string $route_name) : self
Parameters
- $route_name : string
Return values
selfsetStatus()
sets status
public
setStatus(int $status) : self
Parameters
- $status : int
Return values
selfsetType()
sets type
public
setType(string $type) : self
Parameters
- $type : string
Return values
selfsetUri()
sets uri
public
setUri(string $uri) : self
Parameters
- $uri : string
Return values
selfsetVars()
set router vars
public
setVars(mixed $vars) : self
Parameters
- $vars : mixed
Return values
selftoString()
{@inheritdoc}
public
toString() : string
Return values
stringworksOffline()
checks if route works also if site is offline
public
worksOffline() : bool