Пример #1
0
 public function __construct(Reader_Abstract $reader, $key = null, Transform_Abstract $transform = null)
 {
     parent::__construct($reader);
     if ($key === null || $transform === null) {
         throw new \Exception("Must supply both a key to change and a transform to apply");
     }
 }
Пример #2
0
 public function __construct(Reader_Abstract $reader, $key = null)
 {
     parent::__construct($reader);
     if (!is_string($key . "")) {
         throw new \Exception("Key to collect from stream is required");
     }
     $this->key = $key;
 }
Пример #3
0
 public function __construct(Reader_Abstract $reader)
 {
     $reader->rewind();
     parent::__construct(new Reader_Array($reader->current()));
 }