public function __construct($document) { $this->document = $document; $this->dom = $document->dom; $this->namespaces =& $document->namespaces; }