mirror of
https://github.com/danog/byte-stream.git
synced 2024-11-26 20:04:51 +01:00
Add Parser::getBuffer()
This commit is contained in:
parent
7a20d5b177
commit
253aaaf4fa
@ -46,6 +46,16 @@ class Parser implements OutputStream {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows inspecting the current buffer. This might be required to get the remaining buffer data in case an input
|
||||
* stream ends and there's still something in the buffer.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBuffer(): string {
|
||||
return $this->buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels the generator parser and returns any remaining data in the internal buffer. Writing data after calling
|
||||
* this method will result in an error.
|
||||
|
Loading…
Reference in New Issue
Block a user