Doc #80891 [Com]: DOMDocument::registerNodeClass contains wrong information

From: Date: Fri, 23 Dec 2022 06:10:11 +0000
Subject: Doc #80891 [Com]: DOMDocument::registerNodeClass contains wrong information
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-19523@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 Comment by: kimia dot ssalamo9881 at gmail dot com Reported by: andrey at email dot dp dot ua Summary: DOMDocument::registerNodeClass contains wrong information 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: Thanks for that. (https://www.pmppayslip.net/)github.com Previous Comments: ------------------------------------------------------------------------ [2021-07-07 17:17:27] cmb@php.net Right; but example #4 (Custom objects are transient) is still correct, and needs to be considered by the developer. ------------------------------------------------------------------------ [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

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