Documentation

Proxy
in package

Provides basic proxies for handlers.

Tags
final

Table of Contents

wrapStreaming()  : callable
Sends streaming requests to a streaming compatible handler while sending all other requests to a default handler.
wrapSync()  : callable
Sends synchronous requests to a specific handler while sending all other requests to another handler.

Methods

wrapStreaming()

Sends streaming requests to a streaming compatible handler while sending all other requests to a default handler.

public static wrapStreaming(callable $default, callable $streaming) : callable

This, for example, could be useful for taking advantage of the performance benefits of curl while still supporting true streaming through the StreamHandler.

Parameters
$default : callable
$streaming : callable
Return values
callable

wrapSync()

Sends synchronous requests to a specific handler while sending all other requests to another handler.

public static wrapSync(callable $default, callable $sync) : callable
Parameters
$default : callable
$sync : callable
Return values
callable

Search results