Doc #80891 [Opn->Ver]: DOMDocument::registerNodeClass contains wrong information

From: Date: Wed, 07 Jul 2021 17:17:27 +0000
Subject: Doc #80891 [Opn->Ver]: DOMDocument::registerNodeClass contains wrong information
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18926@lists.php.net to get a copy of this message
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)

« previous php.doc.bugs (#18926) next »