Beispiel #1
0
 /**
  * Create a new file input stream instance.
  *
  * @param string $source The file path.
  * @param string $mode The accessing mode.
  */
 public function __construct($source, $mode)
 {
     parent::__construct();
     $this->source = $source;
     $this->mode = $mode;
     $this->resource = @fopen($source, $mode);
     $this->closed = false === $this->resource ? true : false;
 }
Beispiel #2
0
 /**
  * Constructor.
  *
  * @param PipedOutputStreamInterface $upstream The piped output stream to
  * connect.
  */
 public function __construct(PipedOutputStreamInterface $upstream = null)
 {
     parent::__construct();
     $this->buffer = '';
     $this->upstream = $upstream;
     $this->closed = false;
     if (null !== $upstream) {
         $this->connect($upstream, true);
     }
 }
Beispiel #3
0
 /**
  * Constructor.
  *
  * @param string $buffer The underlying input buffer.
  */
 public function __construct($buffer)
 {
     parent::__construct();
     $this->buffer = $buffer;
     $this->offset = 0;
 }
Beispiel #4
0
 /**
  * {@inheritdoc}
  */
 public function close()
 {
     $this->in->close();
     parent::close();
     return $this;
 }