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"); } }
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; }
public function __construct(Reader_Abstract $reader) { $reader->rewind(); parent::__construct(new Reader_Array($reader->current())); }