Doc #80891 [Opn->Ver]: DOMDocument::registerNodeClass contains wrong information
Edit report at https://bugs.php.net/bug.php?id=80891&edit=1
ID: 80891
Updated by: cmb@php.net
Reported by: andrey at email dot dp dot ua
Summary: DOMDocument::registerNodeClass contains wrong
information
-Status: Open
+Status: Verified
Type: Documentation Problem
Package: DOM XML related
Operating System: Debian Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Right; but example #4 (Custom objects are transient) is still
correct, and needs to be considered by the developer.
Previous Comments:
------------------------------------------------------------------------
[2021-03-19 20:30:38] andrey at email dot dp dot ua
Description:
------------
DOMDocument::registerNodeClass manual contains the following chapter:
"Example #3 Retrieving owner document
When instantiating a custom DOMDocument the ownerDocument property will refer to the instantiated
class, meaning there is no need (and in fact not possible) to use DOMDocument::registerNodeClass()
with DOMDocument"
In fact this information is wrong. DOMDocument::registerNodeClass() with DOMDocument is required to
set to work with extended DOMDocument classes
Otherwise extended DOMDocument class will be changed to unextended DOMDocument on context change
Please look at:
Bug #60323
Extended DOMDocument will change to unextended DOMDocument on context change
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80891&edit=1
Thread (3 messages)