YouTubePHP Documentation

React
in package
implements DriverInterface

FinalYes

The default {@see DriverInterface}: a non-blocking {@see Browser} from `react/http`.

Error responses resolve rather than reject, so Http can read Google's error body and map it to a typed exception. The timeout covers a whole ordinary request, but only the wait for the headers of a streaming one: the live chat stream stays open for as long as the chat is busy.

Tags
since
1.0.0
author

Valithor Obsidion valithor@valgorithms.com

Table of Contents

Interfaces

DriverInterface
Executes a single prepared {@see Request} and resolves with the raw {@see ResponseInterface}, success or error status alike. Retries, error mapping and quota are {@see Http}'s job, not the driver's.

Properties

$browser  : Browser

Methods

__construct()  : mixed
runRequest()  : PromiseInterface<string|int, ResponseInterface>

Properties

$browser

private Browser $browser

Methods

__construct()

public __construct(LoopInterface $loop[, array<string, mixed> $socketOptions = [] ][, float $timeout = 60.0 ]) : mixed
Parameters
$loop : LoopInterface
$socketOptions : array<string, mixed> = []

Passed to React\Socket\Connector (e.g. a tls.cafile on Windows).

$timeout : float = 60.0

runRequest()

public runRequest(Request $request[, bool $streaming = false ]) : PromiseInterface<string|int, ResponseInterface>
Parameters
$request : Request
$streaming : bool = false

Resolve as soon as the headers arrive, with a body that is a React\Stream\ReadableStreamInterface still receiving data. Only the live chat stream asks for this.

Return values
PromiseInterface<string|int, ResponseInterface>
On this page

Search results