StreamHandler
in package
HTTP handler that uses PHP's HTTP stream wrapper.
Table of Contents
- $lastHeaders : mixed
- __invoke() : PromiseInterface
- Sends an HTTP request.
- add_cert() : mixed
- add_debug() : mixed
- add_progress() : mixed
- add_proxy() : mixed
- add_timeout() : mixed
- add_verify() : mixed
- addNotification() : mixed
- callArray() : mixed
- checkDecode() : mixed
- createResource() : resource
- Create a resource and check to ensure it was created successfully
- createResponse() : mixed
- createSink() : mixed
- createStream() : mixed
- drain() : StreamInterface
- Drains the source stream into the "sink" client option.
- getDefaultContext() : mixed
- invokeStats() : mixed
- resolveHost() : mixed
Properties
$lastHeaders
private
mixed
$lastHeaders
= []
Methods
__invoke()
Sends an HTTP request.
public
__invoke(RequestInterface $request, array<string|int, mixed> $options) : PromiseInterface
Parameters
- $request : RequestInterface
-
Request to send.
- $options : array<string|int, mixed>
-
Request transfer options.
Return values
PromiseInterface —add_cert()
private
add_cert(RequestInterface $request, mixed &$options, mixed $value, mixed &$params) : mixed
Parameters
- $request : RequestInterface
- $options : mixed
- $value : mixed
- $params : mixed
Return values
mixed —add_debug()
private
add_debug(RequestInterface $request, mixed &$options, mixed $value, mixed &$params) : mixed
Parameters
- $request : RequestInterface
- $options : mixed
- $value : mixed
- $params : mixed
Return values
mixed —add_progress()
private
add_progress(RequestInterface $request, mixed &$options, mixed $value, mixed &$params) : mixed
Parameters
- $request : RequestInterface
- $options : mixed
- $value : mixed
- $params : mixed
Return values
mixed —add_proxy()
private
add_proxy(RequestInterface $request, mixed &$options, mixed $value, mixed &$params) : mixed
Parameters
- $request : RequestInterface
- $options : mixed
- $value : mixed
- $params : mixed
Return values
mixed —add_timeout()
private
add_timeout(RequestInterface $request, mixed &$options, mixed $value, mixed &$params) : mixed
Parameters
- $request : RequestInterface
- $options : mixed
- $value : mixed
- $params : mixed
Return values
mixed —add_verify()
private
add_verify(RequestInterface $request, mixed &$options, mixed $value, mixed &$params) : mixed
Parameters
- $request : RequestInterface
- $options : mixed
- $value : mixed
- $params : mixed
Return values
mixed —addNotification()
private
addNotification(array<string|int, mixed> &$params, callable $notify) : mixed
Parameters
- $params : array<string|int, mixed>
- $notify : callable
Return values
mixed —callArray()
private
callArray(array<string|int, mixed> $functions) : mixed
Parameters
- $functions : array<string|int, mixed>
Return values
mixed —checkDecode()
private
checkDecode(array<string|int, mixed> $options, array<string|int, mixed> $headers, mixed $stream) : mixed
Parameters
- $options : array<string|int, mixed>
- $headers : array<string|int, mixed>
- $stream : mixed
Return values
mixed —createResource()
Create a resource and check to ensure it was created successfully
private
createResource(callable $callback) : resource
Parameters
- $callback : callable
-
Callable that returns stream resource
Tags
Return values
resource —createResponse()
private
createResponse(RequestInterface $request, array<string|int, mixed> $options, mixed $stream, mixed $startTime) : mixed
Parameters
- $request : RequestInterface
- $options : array<string|int, mixed>
- $stream : mixed
- $startTime : mixed
Return values
mixed —createSink()
private
createSink(StreamInterface $stream, array<string|int, mixed> $options) : mixed
Parameters
- $stream : StreamInterface
- $options : array<string|int, mixed>
Return values
mixed —createStream()
private
createStream(RequestInterface $request, array<string|int, mixed> $options) : mixed
Parameters
- $request : RequestInterface
- $options : array<string|int, mixed>
Return values
mixed —drain()
Drains the source stream into the "sink" client option.
private
drain(StreamInterface $source, StreamInterface $sink, string $contentLength) : StreamInterface
Parameters
- $source : StreamInterface
- $sink : StreamInterface
- $contentLength : string
-
Header specifying the amount of data to read.
Tags
Return values
StreamInterface —getDefaultContext()
private
getDefaultContext(RequestInterface $request) : mixed
Parameters
- $request : RequestInterface
Return values
mixed —invokeStats()
private
invokeStats(array<string|int, mixed> $options, RequestInterface $request, mixed $startTime[, ResponseInterface $response = null ][, mixed $error = null ]) : mixed
Parameters
- $options : array<string|int, mixed>
- $request : RequestInterface
- $startTime : mixed
- $response : ResponseInterface = null
- $error : mixed = null
Return values
mixed —resolveHost()
private
resolveHost(RequestInterface $request, array<string|int, mixed> $options) : mixed
Parameters
- $request : RequestInterface
- $options : array<string|int, mixed>