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
_METHOD
public
mixed
_METHOD
= "REQUEST_METHOD"
_URI
public
mixed
_URI
= "REQUEST_URI"
Properties
$next
The next worker
private
Worker
$next
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 —process()
Function which contains instruction to execute when the worker run
protected
process(Entity $data) : Entity
Parameters
- $data : Entity
Return values
Entity —handle()
Function which create an Request from an HTTP request
private
handle(mixed $data) : Request
Parameters
- $data : mixed
-
The HTTP request headers