Request
in package
implements
RequestInterface
uses
RequestTrait
Carries request to perform host action with payloads and failure as context. Can be cancelled if allows
Tags
Table of Contents
Interfaces
- RequestInterface
- Carries requests and responses between worker and host process.
Properties
- $failure : Throwable|null
- $header : HeaderInterface
- $id : int
- $lastID : int
- $name : string
- $options : array<string|int, mixed>
- $payloads : ValuesInterface
Methods
- __construct() : mixed
- getFailure() : Throwable|null
- Optional failure.
- getHeader() : Header
- getID() : int
- getName() : string
- getOptions() : array<string|int, mixed>
- getPayloads() : ValuesInterface
- setFailure() : void
- withHeader() : self
- getNextID() : int
Properties
$failure
protected
Throwable|null
$failure
= null
$header
protected
HeaderInterface
$header
$id
protected
int
$id
$lastID
protected
static int
$lastID
= 9000
$name
protected
string
$name
$options
protected
array<string|int, mixed>
$options
= []
$payloads
protected
ValuesInterface
$payloads
Methods
__construct()
public
__construct(non-empty-string $name[, RequestOptions $options = [] ][, ValuesInterface $payloads = null ][, HeaderInterface|null $header = null ]) : mixed
Parameters
- $name : non-empty-string
- $options : RequestOptions = []
- $payloads : ValuesInterface = null
- $header : HeaderInterface|null = null
getFailure()
Optional failure.
public
getFailure() : Throwable|null
Return values
Throwable|nullgetHeader()
public
getHeader() : Header
Return values
HeadergetID()
public
getID() : int
Return values
intgetName()
public
getName() : string
Return values
stringgetOptions()
public
getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>getPayloads()
public
getPayloads() : ValuesInterface
Return values
ValuesInterfacesetFailure()
public
setFailure(Throwable|null $failure) : void
Parameters
- $failure : Throwable|null
withHeader()
public
withHeader(HeaderInterface $header) : self
Parameters
- $header : HeaderInterface
Return values
selfgetNextID()
private
getNextID() : int