MatchInterface
in
Pop router match interface
Tags
Table of Contents
Methods
- addDispatchableParams() : MatchInterface
- Add dispatchable params to be passed into a new dispatchable instance
- addRoute() : MatchInterface
- Add a route
- addRoutes() : MatchInterface
- Add multiple controller routes
- appendDispatchableParams() : MatchInterface
- Append dispatchable params to be passed into a new dispatchable instance
- getAction() : mixed
- Get the action
- getDefaultRoute() : array<string|int, mixed>
- Get the default route
- getDispatchable() : mixed
- Get the dispatchable
- getDispatchableParams() : mixed
- Get the params assigned to the dispatchable
- getDynamicRoute() : mixed
- Get the dynamic route
- getDynamicRoutePrefix() : mixed
- Get the dynamic route prefix
- getFlattenedRoutes() : array<string|int, mixed>
- Get flattened routes
- getOriginalRoute() : string|null
- Get original route string
- getPreparedRoutes() : array<string|int, mixed>
- Get prepared routes
- getRoute() : string
- Get route string
- getRouteConfig() : mixed
- Get route config
- getRouteParams() : array<string|int, mixed>
- Get the params discovered from the route
- getRoutes() : array<string|int, mixed>
- Get routes
- getRouteString() : string
- Get the route string
- getSegment() : string|null
- Get a route string segment
- getSegments() : array<string|int, mixed>
- Get the route string segments
- hasAction() : bool
- Determine if there is an action
- hasDefaultRoute() : bool
- Determine if there is a default route
- hasDispatchable() : bool
- Determine if there is a dispatchable
- hasDispatchableParams() : bool
- Determine if the dispatchable has params
- hasDynamicRoute() : bool
- Determine if there is a dynamic route
- hasName() : bool
- Has a route name
- hasRoute() : bool
- Determine if there is a route match
- hasRouteParams() : bool
- Determine if the route has params
- isDynamicRoute() : bool
- Determine if it is a dynamic route
- match() : bool
- Match the route
- name() : MatchInterface
- Add a route name
- noRouteFound() : void
- Method to process if a route was not found
- prepare() : MatchInterface
- Match the route
- removeDispatchableParams() : MatchInterface
- Remove dispatchable params
Methods
addDispatchableParams()
Add dispatchable params to be passed into a new dispatchable instance
public
addDispatchableParams(string $dispatchable, mixed $params) : MatchInterface
Parameters
- $dispatchable : string
- $params : mixed
Return values
MatchInterfaceaddRoute()
Add a route
public
addRoute(string $route, mixed $controller) : MatchInterface
Parameters
- $route : string
- $controller : mixed
Return values
MatchInterfaceaddRoutes()
Add multiple controller routes
public
addRoutes(array<string|int, mixed> $routes) : MatchInterface
Parameters
- $routes : array<string|int, mixed>
Return values
MatchInterfaceappendDispatchableParams()
Append dispatchable params to be passed into a new dispatchable instance
public
appendDispatchableParams(string $dispatchable, mixed $params) : MatchInterface
Parameters
- $dispatchable : string
- $params : mixed
Return values
MatchInterfacegetAction()
Get the action
public
getAction() : mixed
getDefaultRoute()
Get the default route
public
getDefaultRoute() : array<string|int, mixed>
Return values
array<string|int, mixed>getDispatchable()
Get the dispatchable
public
getDispatchable() : mixed
getDispatchableParams()
Get the params assigned to the dispatchable
public
getDispatchableParams(string $dispatchable) : mixed
Parameters
- $dispatchable : string
getDynamicRoute()
Get the dynamic route
public
getDynamicRoute() : mixed
getDynamicRoutePrefix()
Get the dynamic route prefix
public
getDynamicRoutePrefix() : mixed
getFlattenedRoutes()
Get flattened routes
public
getFlattenedRoutes() : array<string|int, mixed>
Return values
array<string|int, mixed>getOriginalRoute()
Get original route string
public
getOriginalRoute() : string|null
Return values
string|nullgetPreparedRoutes()
Get prepared routes
public
getPreparedRoutes() : array<string|int, mixed>
Return values
array<string|int, mixed>getRoute()
Get route string
public
getRoute() : string
Return values
stringgetRouteConfig()
Get route config
public
getRouteConfig([string|null $key = null ]) : mixed
Parameters
- $key : string|null = null
getRouteParams()
Get the params discovered from the route
public
getRouteParams() : array<string|int, mixed>
Return values
array<string|int, mixed>getRoutes()
Get routes
public
getRoutes() : array<string|int, mixed>
Return values
array<string|int, mixed>getRouteString()
Get the route string
public
getRouteString() : string
Return values
stringgetSegment()
Get a route string segment
public
getSegment(int $i) : string|null
Parameters
- $i : int
Return values
string|nullgetSegments()
Get the route string segments
public
getSegments() : array<string|int, mixed>
Return values
array<string|int, mixed>hasAction()
Determine if there is an action
public
hasAction() : bool
Return values
boolhasDefaultRoute()
Determine if there is a default route
public
hasDefaultRoute() : bool
Return values
boolhasDispatchable()
Determine if there is a dispatchable
public
hasDispatchable() : bool
Return values
boolhasDispatchableParams()
Determine if the dispatchable has params
public
hasDispatchableParams(string $dispatchable) : bool
Parameters
- $dispatchable : string
Return values
boolhasDynamicRoute()
Determine if there is a dynamic route
public
hasDynamicRoute() : bool
Return values
boolhasName()
Has a route name
public
hasName(string $routeName) : bool
Parameters
- $routeName : string
Return values
boolhasRoute()
Determine if there is a route match
public
hasRoute() : bool
Return values
boolhasRouteParams()
Determine if the route has params
public
hasRouteParams() : bool
Return values
boolisDynamicRoute()
Determine if it is a dynamic route
public
isDynamicRoute() : bool
Return values
boolmatch()
Match the route
public
match([string|array<string|int, mixed>|null $forceRoute = null ]) : bool
Parameters
- $forceRoute : string|array<string|int, mixed>|null = null
Return values
boolname()
Add a route name
public
name(string $routeName) : MatchInterface
Parameters
- $routeName : string
Return values
MatchInterfacenoRouteFound()
Method to process if a route was not found
public
noRouteFound([bool $exit = true ]) : void
Parameters
- $exit : bool = true
prepare()
Match the route
public
prepare() : MatchInterface
Return values
MatchInterfaceremoveDispatchableParams()
Remove dispatchable params
public
removeDispatchableParams(string $dispatchable) : MatchInterface
Parameters
- $dispatchable : string