Amp\Parallel\Sync\ChannelParser classChannelParser extendsAmp\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 functionencode(mixed$data):string
No documentation.
Type Parameter Description Default Value
mixed $data Data to encode to send over a channel. none
cancel —publicfinal functioncancel():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 —publicfinal functionisValid():bool
No documentation.
push —publicfinal functionpush(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