Orpheus

InputRequest
in package

AbstractYes

Table of Contents

Properties

$input  : array<string|int, mixed>|string|null
The input (like stdin)
$mainRequest  : static|null
The current main request
$parameters  : array<string|int, mixed>
The input parameters (inline parameters)
$path  : string
The path
$pathValues  : array<string|int, mixed>
The values in path
$route  : ControllerRoute|null
The found route for this request A request could exist without any route (e.g. Route initialization failed)

Methods

__construct()  : mixed
Constructor
cloneWithPath()  : InputRequest
Clone this request using another path (expecting a sub path)
findFirstMatchingRoute()  : array<string|int, mixed>
Find a matching route according to the request
getController()  : AbstractController
Get running controller
getDefaultController()  : mixed
getInput()  : array<string|int, mixed>
Get input
getInputValue()  : mixed
Get the input by $key, assuming $default value
getMainRequest()  : InputRequest|null
Get the main input request
getOption()  : mixed
Get the option by $key, assuming $default value
getParameter()  : mixed
Get the parameter by $key, assuming $default value
getParameters()  : array<string|int, mixed>
Get all parameters
getPath()  : string
Get the path
getRoute()  : ControllerRoute|null
Get the route to this request
getRouteClass()  : string
getRouteName()  : string
Get the route name to this request
getRoutes()  : array<string|int, ControllerRoute>
Get all available routes
hasInput()  : bool
Test if request has any input
hasInputValue()  : bool
Test if input $key exists in this request
hasParameter()  : bool
Test if parameter $key exists in this request
matchPath()  : string
Test path is matching regex
process()  : OutputResponse
Process the request by finding a route and processing it
processRoute()  : OutputResponse
Process the given route
redirect()  : RedirectHttpResponse|null
Redirect response to $route
setRoute()  : InputRequest
Set the route to this request
setInput()  : InputRequest
Set the input
setParameters()  : InputRequest
Set the parameters
setPath()  : InputRequest
Set the path

Properties

$input

The input (like stdin)

protected array<string|int, mixed>|string|null $input

$mainRequest

The current main request

protected static static|null $mainRequest = null

$parameters

The input parameters (inline parameters)

protected array<string|int, mixed> $parameters

$pathValues

The values in path

protected array<string|int, mixed> $pathValues

$route

The found route for this request A request could exist without any route (e.g. Route initialization failed)

protected ControllerRoute|null $route = null

Methods

__construct()

Constructor

public __construct(string $path, array<string|int, mixed> $parameters, array<string|int, mixed>|string|null $input) : mixed
Parameters
$path : string
$parameters : array<string|int, mixed>
$input : array<string|int, mixed>|string|null

cloneWithPath()

Clone this request using another path (expecting a sub path)

public cloneWithPath(string $path) : InputRequest
Parameters
$path : string
Return values
InputRequest

findFirstMatchingRoute()

Find a matching route according to the request

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

getDefaultController()

public abstract static getDefaultController() : mixed

getInput()

Get input

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

getInputValue()

Get the input by $key, assuming $default value

public getInputValue(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string
$default : mixed = null

getOption()

Get the option by $key, assuming $default value

public getOption(string $key[, string|null $short = null ][, mixed|null $default = null ]) : mixed
Parameters
$key : string
$short : string|null = null
$default : mixed|null = null

getParameter()

Get the parameter by $key, assuming $default value

public getParameter(string $key[, mixed|null $default = null ]) : mixed
Parameters
$key : string
$default : mixed|null = null

getParameters()

Get all parameters

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

getPath()

Get the path

public getPath() : string
Return values
string

getRouteClass()

public abstract static getRouteClass() : string
Return values
string

getRouteName()

Get the route name to this request

public getRouteName() : string
Return values
string

hasInput()

Test if request has any input

public hasInput() : bool
Return values
bool

hasInputValue()

Test if input $key exists in this request

public hasInputValue(string $key) : bool
Parameters
$key : string
Return values
bool

hasParameter()

Test if parameter $key exists in this request

public hasParameter(string $key) : bool
Parameters
$key : string
Return values
bool

matchPath()

Test path is matching regex

public matchPath(string $regex, array<string|int, mixed>|null &$matches) : string
Parameters
$regex : string
$matches : array<string|int, mixed>|null
Return values
string

setInput()

Set the input

protected setInput(array<string|int, mixed>|string|null $input) : InputRequest
Parameters
$input : array<string|int, mixed>|string|null
Return values
InputRequest

setParameters()

Set the parameters

protected setParameters(array<string|int, mixed> $parameters) : InputRequest
Parameters
$parameters : array<string|int, mixed>
Return values
InputRequest

							
On this page

Search results