abstract class AbstractParser implements ParserInterface (View source)

The base parser class that all other parser classes extend from. It handles low-level functionality that is shared across all parser classes.

Methods

string
__toString()

Returns an opaque string representing the object.

string
readStream(StreamInterface $stream)

Reads the contents of the stream resource.

Details

string __toString()

Returns an opaque string representing the object.

Note: Use of MD5 here is not cryptographically significant.

string readStream(StreamInterface $stream)

Reads the contents of the stream resource.

Parameters

StreamInterface $stream A PSR-7 StreamInterface which is typically returned by the getBody() method of a ResponseInterface class.

Return Value

string The raw contents of the steam resource.