Esempio n. 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;
 }
Esempio n. 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);
     }
 }
Esempio n. 3
0
 /**
  * Constructor.
  *
  * @param string $buffer The underlying input buffer.
  */
 public function __construct($buffer)
 {
     parent::__construct();
     $this->buffer = $buffer;
     $this->offset = 0;
 }
Esempio n. 4
0
 /**
  * Create a filter input stream instance with the specified subordinate
  * input stream.
  *
  * @param InputStreamInterface $in The subordinate input stream.
  */
 public function __construct(InputStreamInterface $in)
 {
     parent::__construct();
     $this->in = $in;
 }