Ejemplo n.º 1
0
 /**
  * Creates the input.
  */
 public function __construct()
 {
     parent::__construct(fopen('php://stdin', 'r'));
 }
Ejemplo n.º 2
0
 /**
  * Creates the input stream.
  *
  * @param string $string The string to read from.
  */
 public function __construct($string = '')
 {
     $this->stream = fopen('php://memory', 'rw');
     parent::__construct($this->stream);
     $this->set($string);
 }