Properties

$path

$path : string

The path

Type

string

$parameters

$parameters : array

The input parameters (inline parameters)

Type

array

$input

$input : array

The input (like stdin)

Type

array

Methods

__construct()

__construct(string  $path, array  $parameters, array  $input) 

Constructor

Parameters

string $path
array $parameters
array $input

findFirstMatchingRoute()

findFirstMatchingRoute(boolean  $alternative = false) : \Orpheus\InputController\Route

Find a matching route according to the request

Parameters

boolean $alternative

Returns

\Orpheus\InputController\Route

redirect()

redirect(\Orpheus\InputController\ControllerRoute  $route) : NULL

Redirect response to $route

Parameters

\Orpheus\InputController\ControllerRoute $route

Returns

NULL —

Should be overridden to be used

getRoutes()

getRoutes() : array

Get all available routes

Returns

array

getPath()

getPath() : string

Get the path

Returns

string

getParameter()

getParameter(string  $key, mixed  $default = null) : mixed

Get the parameter by $key, assuming $default value

Parameters

string $key
mixed $default

Returns

mixed

hasParameter()

hasParameter(string  $key) : boolean

Test if parameter $key exists in this request

Parameters

string $key

Returns

boolean

getParameters()

getParameters() : array

Get all parameters

Returns

array

hasInput()

hasInput() : boolean

Test if request has any input

Returns

boolean

getInput()

getInput() : array

Get input

Returns

array

getInputValue()

getInputValue(string  $key, mixed  $default = null) : mixed

Get the input by $key, assuming $default value

Parameters

string $key
mixed $default

Returns

mixed

hasInputValue()

hasInputValue(string  $key) : boolean

Test if input $key exists in this request

Parameters

string $key

Returns

boolean

getRouteName()

getRouteName() : string

Get the route name to this request

Returns

string