note 77957 added to function.dom-domdocument-registernodeclass
| From: | mjong at magnafacta dot com | Date: | Fri, 21 Sep 2007 12:07:56 +0000 |
| Subject: | note 77957 added to function.dom-domdocument-registernodeclass | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130656@lists.php.net to get a copy of this message | ||
If you want to implement your own DOMDocument class you have to register your new document class.
Otherwise $node->ownerDocument will return an object of the type DOMDocument without your extra
features.
I.e.:
public function __construct($version = "1.0", $encoding = "UTF-8")
{
parent::__construct($version, $encoding);
parent::registerNodeClass('DOMDocument', get_class($this));
}
----
Server IP: 69.147.83.197
Probable Submitter: 217.149.198.192
----
Manual Page -- http://www.php.net/manual/en/function.dom-domdocument-registernodeclass.php
Edit -- https://master.php.net/note/edit/77957
Del: integrated -- https://master.php.net/note/delete/77957/integrated
Del: useless -- https://master.php.net/note/delete/77957/useless
Del: bad code -- https://master.php.net/note/delete/77957/bad+code
Del: spam -- https://master.php.net/note/delete/77957/spam
Del: non-english -- https://master.php.net/note/delete/77957/non-english
Del: in docs -- https://master.php.net/note/delete/77957/in+docs
Del: other reasons-- https://master.php.net/note/delete/77957
Reject -- https://master.php.net/note/reject/77957
Search -- https://master.php.net/manage/user-notes.php