Documentation

RequestHandler extends Worker

A worker which handles the request context and extract required information for all other workers.

IMPORTANT : This is the first worker of the pipeline.

Table of Contents

_METHOD  = "REQUEST_METHOD"
_URI  = "REQUEST_URI"
$next  : Worker
The next worker
getNext()  : Worker
Get the worker after this worker in the pipe
run()  : Entity
Function which start the execution to a chain of workers by starting from this worker
setNext()  : void
Set the worker after this worker in the pipe
process()  : Entity
Function which contains instruction to execute when the worker run
handle()  : Request
Function which create an Request from an HTTP request

Constants

Properties

Methods

getNext()

Get the worker after this worker in the pipe

public getNext() : Worker
Return values
Worker

run()

Function which start the execution to a chain of workers by starting from this worker

public run(Entity $data[, bool $rewrite_data = false ]) : Entity
Parameters
$data : Entity
$rewrite_data : bool = false
Return values
Entity

setNext()

Set the worker after this worker in the pipe

public setNext(Worker $next) : void
Parameters
$next : Worker
Return values
void

handle()

Function which create an Request from an HTTP request

private handle(mixed $data) : Request
Parameters
$data : mixed

The HTTP request headers

Return values
Request

Search results