1
0
mirror of https://github.com/danog/byte-stream.git synced 2024-11-26 20:04:51 +01:00

Add getResource() to resource streams

This commit is contained in:
Niklas Keller 2017-05-05 16:45:53 +02:00
parent 622f98c966
commit 73e6441fd9
2 changed files with 8 additions and 0 deletions

View File

@ -127,6 +127,10 @@ class ResourceInputStream implements InputStream {
Loop::cancel($this->watcher);
}
public function getResource() {
return $this->resource;
}
public function __destruct() {
if ($this->autoClose) {
$this->close();

View File

@ -206,6 +206,10 @@ class ResourceOutputStream implements OutputStream {
Loop::cancel($this->watcher);
}
public function getResource() {
return $this->resource;
}
public function __destruct() {
if ($this->autoClose) {
$this->close();