Documentation

MatchInterface
in

Pop router match interface

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.2.0

Table of Contents

Methods

addControllerParams()  : MatchInterface
Add controller params to be passed into a new controller instance
addRoute()  : MatchInterface
Add a route
addRoutes()  : MatchInterface
Add multiple controller routes
appendControllerParams()  : MatchInterface
Append controller params to be passed into a new controller instance
getAction()  : mixed
Get the action
getController()  : mixed
Get the controller
getControllerParams()  : mixed
Get the params assigned to the controller
getDefaultRoute()  : array<string|int, mixed>
Get the default route
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
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
hasController()  : bool
Determine if there is a controller
hasControllerParams()  : bool
Determine if the controller has params
hasDefaultRoute()  : bool
Determine if there is a default route
hasDynamicRoute()  : bool
Determine if there is a dynamic route
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
Prepare the routes
noRouteFound()  : void
Method to process if a route was not found
prepare()  : MatchInterface
Match the route
removeControllerParams()  : MatchInterface
Remove controller params

Methods

addControllerParams()

Add controller params to be passed into a new controller instance

public addControllerParams(string $controller, mixed $params) : MatchInterface
Parameters
$controller : string
$params : mixed
Return values
MatchInterface

appendControllerParams()

Append controller params to be passed into a new controller instance

public appendControllerParams(string $controller, mixed $params) : MatchInterface
Parameters
$controller : string
$params : mixed
Return values
MatchInterface

getController()

Get the controller

public getController() : mixed

getControllerParams()

Get the params assigned to the controller

public getControllerParams(string $controller) : mixed
Parameters
$controller : string

getDefaultRoute()

Get the default route

public getDefaultRoute() : array<string|int, mixed>
Return values
array<string|int, mixed>

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|null

getPreparedRoutes()

Get prepared routes

public getPreparedRoutes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRoute()

Get route string

public getRoute() : string
Return values
string

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
string

getSegment()

Get a route string segment

public getSegment(int $i) : string|null
Parameters
$i : int
Return values
string|null

getSegments()

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
bool

hasController()

Determine if there is a controller

public hasController() : bool
Return values
bool

hasControllerParams()

Determine if the controller has params

public hasControllerParams(string $controller) : bool
Parameters
$controller : string
Return values
bool

hasDefaultRoute()

Determine if there is a default route

public hasDefaultRoute() : bool
Return values
bool

hasDynamicRoute()

Determine if there is a dynamic route

public hasDynamicRoute() : bool
Return values
bool

hasRoute()

Determine if there is a route match

public hasRoute() : bool
Return values
bool

hasRouteParams()

Determine if the route has params

public hasRouteParams() : bool
Return values
bool

isDynamicRoute()

Determine if it is a dynamic route

public isDynamicRoute() : bool
Return values
bool

match()

Prepare the routes

public match([mixed $forceRoute = null ]) : bool
Parameters
$forceRoute : mixed = null
Return values
bool

noRouteFound()

Method to process if a route was not found

public noRouteFound([bool $exit = true ]) : void
Parameters
$exit : bool = true

        
On this page

Search results