Orpheus

HttpController extends AbstractController
in package

AbstractYes

Table of Contents

Constants

OPTION_PAGE_DESCRIPTION  = 'pageDescription'
OPTION_PAGE_TITLE  = 'pageTitle'

Properties

$catchControllerOutput  : bool
Catch controller output when running it
$options  : array<string|int, mixed>
Running options for this controller
$route  : ControllerRoute|null
The route calling this controller A controller could be called without any route and any request This variable comes to get the route without any request
$request  : InputRequest|null
The request calling this controller

Methods

__construct()  : mixed
Controller constructor
__toString()  : string
Get this controller as string
fillValues()  : void
Fill array with default values
getCurrentUrl()  : string
getOption()  : string|mixed
Get an option by $key
getRequest()  : InputRequest|null
Get the request
getRoute()  : ControllerRoute|null
Get the route
getRouteName()  : string|null
Get the route name
getValues()  : array<string|int, mixed>
Get parameter values of this controller Use it to generate routes (as for menus) with path parameters & you can get the current context
postRun()  : OutputResponse|null
After running the controller
prepare()  : HttpResponse|null
Prepare environment for this request
preRun()  : OutputResponse|null
Before running controller
preRun()  : HttpResponse|null
Before running controller
process()  : OutputResponse|null
Process the $request
processException()  : HttpResponse
processUserException()  : HtmlHttpResponse
Process the given UserException
render()  : mixed
Render the given $layout in $response using $values
renderHtml()  : HtmlHttpResponse
Render the given $layout with $values
run()  : OutputResponse
Run this controller
run()  : HttpResponse
Run this controller
setOption()  : AbstractController
Set an option by $key
setOptions()  : AbstractController
Set an option by $key
redirectToSelf()  : RedirectHttpResponse

Constants

OPTION_PAGE_DESCRIPTION

public mixed OPTION_PAGE_DESCRIPTION = 'pageDescription'

Properties

$catchControllerOutput

Catch controller output when running it

protected bool $catchControllerOutput = true

$options

Running options for this controller

protected array<string|int, mixed> $options = []

$route

The route calling this controller A controller could be called without any route and any request This variable comes to get the route without any request

protected ControllerRoute|null $route = null

Methods

__toString()

Get this controller as string

public __toString() : string
Return values
string

fillValues()

Fill array with default values

public fillValues([array<string|int, mixed> &$values = [] ]) : void
Parameters
$values : array<string|int, mixed> = []

getCurrentUrl()

public getCurrentUrl() : string
Return values
string

getOption()

Get an option by $key

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

getRouteName()

Get the route name

public getRouteName() : string|null
Return values
string|null

getValues()

Get parameter values of this controller Use it to generate routes (as for menus) with path parameters & you can get the current context

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

postRun()

After running the controller

public postRun(mixed $request, mixed $response) : OutputResponse|null
Parameters
$request : mixed
$response : mixed
Tags
noinspection

PhpUnusedParameterInspection

Return values
OutputResponse|null

processException()

public processException(Exception $exception[, array<string|int, mixed> $values = [] ]) : HttpResponse
Parameters
$exception : Exception
$values : array<string|int, mixed> = []
Return values
HttpResponse

render()

Render the given $layout in $response using $values

public render(OutputResponse $response, string $layout[, array<string|int, mixed> $values = [] ]) : mixed
Parameters
$response : OutputResponse
$layout : string
$values : array<string|int, mixed> = []
Return values
mixed

The $response

renderHtml()

Render the given $layout with $values

public renderHtml(string $layout[, array<string|int, mixed> $values = [] ]) : HtmlHttpResponse
Parameters
$layout : string
$values : array<string|int, mixed> = []
Return values
HtmlHttpResponse

							
On this page

Search results