mirror of
https://github.com/danog/byte-stream.git
synced 2024-11-30 04:19:23 +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
|
* Cancels the generator parser and returns any remaining data in the internal buffer. Writing data after calling
|
||||||
* this method will result in an error.
|
* this method will result in an error.
|
||||||
|
Loading…
Reference in New Issue
Block a user