Amp\Parallel\Sync\ChannelParser class ChannelParser extends Amp\Parser\Parser

Summary

Properties

Methods

Methods

__construct — public function __construct(callable $callback)
No documentation.
Type Parameter Description Default Value
callable $callback No documentation. none
encode — public function encode(mixed $data): string
No documentation.
Type Parameter Description Default Value
mixed $data Data to encode to send over a channel. none
cancel — public final function cancel(): string

Cancels the generator parser and returns any remaining data in the internal buffer. Writing data after calling this method will result in an error.

isValid — public final function isValid(): bool
No documentation.
push — public final function push(string $data)

Adds data to the internal buffer and tries to continue parsing.

Type Parameter Description Default Value
string $data Data to append to the internal buffer. none