class ComponentContext (View source)

deprecated Will be removed without replacement with next major

The component context

An instance of this class will be passed to each component of the chain allowing them to read/write parameters to/from it. Besides handling of the chain is interrupted as soon as the "cancelled" flag is set.

The instance will be created before the bootstrap, so AOP/DI proxying is not possible.

Properties

protected ServerRequestInterface $httpRequest

The current HTTP request

protected ResponseInterface $httpResponse

The current HTTP response

protected array $parameters

Two-dimensional array storing an parameter dictionary (containing variables that can be read/written by all components) The first dimension is the fully qualified Component name, the second dimension is the identifier for the parameter.

Methods

__construct(ServerRequestInterface $httpRequest, ResponseInterface $httpResponse)

No description

ServerRequestInterface
getHttpRequest()

No description

void
replaceHttpRequest(ServerRequestInterface $httpRequest)

No description

ResponseInterface
getHttpResponse()

No description

void
replaceHttpResponse(ResponseInterface $httpResponse)

No description

mixed
getParameter(string $componentClassName, string $parameterName)

No description

array
getAllParametersFor(string $componentClassName)

No description

setParameter(string $componentClassName, string $parameterName, mixed $value)

No description

Details

__construct(ServerRequestInterface $httpRequest, ResponseInterface $httpResponse)

No description

Parameters

ServerRequestInterface $httpRequest
ResponseInterface $httpResponse

ServerRequestInterface getHttpRequest()

No description

Return Value

ServerRequestInterface

void replaceHttpRequest(ServerRequestInterface $httpRequest)

No description

Parameters

ServerRequestInterface $httpRequest

Return Value

void

ResponseInterface getHttpResponse()

No description

Return Value

ResponseInterface

void replaceHttpResponse(ResponseInterface $httpResponse)

No description

Parameters

ResponseInterface $httpResponse

Return Value

void

mixed getParameter(string $componentClassName, string $parameterName)

No description

Parameters

string $componentClassName
string $parameterName

Return Value

mixed

array getAllParametersFor(string $componentClassName)

No description

Parameters

string $componentClassName

Return Value

array

setParameter(string $componentClassName, string $parameterName, mixed $value)

No description

Parameters

string $componentClassName
string $parameterName
mixed $value