\Gishiki\Core\MVC\Controller\PluginsResponseAssembler

This is a plugin used to generate data to be serialized before being transported by an HTTP Response.

Summary

Methods
Properties
Constants
__construct()
getResponse()
getRequest()
assemblyWith()
assembly()
No public properties found
No constants found
No protected methods found
$request
$response
$application
$data
N/A
No private methods found
No private properties found
N/A

Properties

$request

$request : \Psr\Http\Message\RequestInterface

Type

\Psr\Http\Message\RequestInterface — reference to the HTTP request

$response

$response : \Psr\Http\Message\ResponseInterface

Type

\Psr\Http\Message\ResponseInterface — reference to the HTTP response

$application

$application : \Gishiki\Core\Application|null

Type

\Gishiki\Core\Application|null — the application current instance

Methods

__construct()

__construct(\Psr\Http\Message\RequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response, \Gishiki\Core\Application|null  $app = null) 

Assembler constructor: setup the response ready to be filled nd used

Warning: you should never attempt to use another construction in your plugin, unless it calls parent::__construct()

Parameters

\Psr\Http\Message\RequestInterface $request

the HTTP request

\Psr\Http\Message\ResponseInterface $response

the HTTP response

\Gishiki\Core\Application|null $app

the current application instance

getResponse()

getResponse() : \Psr\Http\Message\ResponseInterface

Get the HTTP response.

Returns

\Psr\Http\Message\ResponseInterface —

the HTTP response

getRequest()

getRequest() : \Psr\Http\Message\RequestInterface

Get the HTTP request.

Returns

\Psr\Http\Message\RequestInterface —

the HTTP request

assemblyWith()

assemblyWith(\Closure  $callable, mixed  $input) : mixed

Execute the given task in order to fulfill the given request

Parameters

\Closure $callable

the task to be ran

mixed $input

input value for generating the response

Throws

\Gishiki\Core\MVC\Controller\ControllerException

the error preventing function execution

Returns

mixed —

the value returned from the task