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

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

__toString()

__toString() : string

Get this request as string

Returns

string

getURL()

getURL() : string

Get the URL used for this request

Returns

string

handleCurrentRequest()

handleCurrentRequest() 

Handle the current request as a CLIRequest one This method ends the script

getRouteClass()

getRouteClass() : string

Get the name of the route class associated to a CLIRequest

Returns

string

getAllData()

getAllData() : array

Get all input data

Returns

array

getData()

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

Get a data by $key, assuming $default

Parameters

string $key
mixed $default

Returns

mixed

getArrayData()

getArrayData(string  $key) : mixed

Get the data by key with array as default

Parameters

string $key

Returns

mixed

hasArrayData()

hasArrayData(string  $key = null) : boolean

Test if data $key is an array

Parameters

string $key

Returns

boolean

hasData()

hasData(string  $key = null) : boolean

Test if data contains the $key

Parameters

string $key

Returns

boolean

hasDataKey()

hasDataKey(string  $path = null, string  $value = null) : boolean

Test if path contains a value and return it as parameter

Parameters

string $path

The path to get the value

string $value

The value as ouput parameter

Returns

boolean