MainRouter
class MainRouter extends Router implements RouteBuilderInterface, DispatcherAwareInterface, DispatcherInterface (View source)
The Router class.
Traits
Methods
build
Class init.
build
match
addBase
Get the controller class suffix string.
addRouteByConfig
loadRoutingFromFiles
loadRoutingFromFile
Set a controller class suffix for a given HTTP method.
Method to get property SuffixMap
Method to set property suffixMap
Method to get property Controller
Method to get property Uri
Method to set property uri
Method to get property Matched
Method to set property matched
Add a listener to this dispatcher, only if not already registered to these events.
on
Details
at line line 186
string
route(string $route, array $queries = array(), string $type = MainRouter::TYPE_PATH)
build
in RouteBuilderTrait at line line 41
string
fullRoute(string $route, array $queries = array())
fullRoute
in RouteBuilderTrait at line line 54
string
rawRoute(string $route, array $queries = array())
rawRoute
in RouteBuilderTrait at line line 66
string
escape(string $text)
escape
at line line 90
__construct(MatcherInterface $matcher, UriData $uri, DispatcherInterface $dispatcher)
Class init.
at line line 110
string
build(string $route, array $queries = array(), string $type = MainRouter::TYPE_RAW)
build
at line line 221
Route
match(string $rawRoute, string $method = 'GET', array $options = array())
match
at line line 284
string
addBase(string $uri, string $path = 'path')
addBase
at line line 305
string
fetchControllerSuffix(string $method = 'GET', array $customSuffix = array())
Get the controller class suffix string.
at line line 360
Route
addRouteByConfig(string $name, array $route, string|AbstractPackage $package = null, string $prefix = '/')
addRouteByConfig
at line line 413
static array
loadRoutingFiles(array $files)
loadRoutingFromFiles
at line line 437
static array
loadRoutingFile(array $file)
loadRoutingFromFile
at line line 450
MainRouter
registerRawRouting(array $routes, PackageResolver $resolver)
loadRawRouting
at line line 489
MainRouter
addRouteByConfigs(array $routes, string|AbstractPackage $package = null)
addRouteByConfigs
at line line 507
MainRouter
addRouteFromFile(string $file, string|AbstractPackage $package = null)
addRouteByFile
at line line 522
MainRouter
addRouteFromFiles(array $files, string|AbstractPackage $package = null)
addRouteByFile
at line line 540
MainRouter
setHttpMethodSuffix(string $method, string $suffix)
Set a controller class suffix for a given HTTP method.
at line line 552
array
getSuffixMap()
Method to get property SuffixMap
at line line 564
MainRouter
setSuffixMap(array $suffixMap)
Method to set property suffixMap
at line line 576
string
getController()
Method to get property Controller
at line line 586
UriData
getUri()
Method to get property Uri
at line line 603
MainRouter
setUri(UriData $uri)
Method to set property uri
at line line 629
Route
getMatched()
Method to get property Matched
at line line 641
MainRouter
setMatched(Route $matched)
Method to set property matched
at line line 663
MainRouter
addListener(object|Closure $listener, array|integer $priorities = array())
Add a listener to this dispatcher, only if not already registered to these events.
If no events are specified, it will be registered to all events matching it's methods name. In the case of a closure, you must specify at least one event name.
at line line 679
MainRouter
listen(string $event, callable $callable, int $priority = ListenerPriority::NORMAL)
on