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:
parent
622f98c966
commit
73e6441fd9
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user