public function __construct(StreamInterface $stream)
 {
     // Trick to get underlying stream
     $socket = $stream->detach();
     $this->socket = $socket;
     $this->stream = new Stream($socket);
 }
Ejemplo n.º 2
0
 public function detach()
 {
     $this->stream->detach();
     $this->size = 0;
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 protected function doDetach()
 {
     return $this->stream->detach();
 }