public function __construct(XMLReader $reader) { if ($reader->nodeType != XMLReader::ELEMENT) { throw new Core_InvalidArgumentValueException('reader', $reader->nodeType); } parent::__construct($reader); $this->attributes = new ArrayObject(parent::attributes()->to_array()); }