Req #53286 [Com]: no way to create an instance of a subclass of DOMDocument with a dtd

From: Date: Fri, 05 May 2023 10:45:50 +0000
Subject: Req #53286 [Com]: no way to create an instance of a subclass of DOMDocument with a dtd
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244375@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=53286&edit=1 ID: 53286 Comment by: autovehicleblog at gmail dot com Reported by: mathroc at gmail dot com Summary: no way to create an instance of a subclass of DOMDocument with a dtd Status: Open Type: Feature/Change Request Package: DOM XML related PHP Version: 5.3.3 Block user comment: N Private report: N New Comment: Auto Vehicle Blog are sharing latest news about auto, car, bikes, electric vehicle, bus, trucks etc. More info to visit:(https://autovehicleblog.com)github.com Previous Comments: ------------------------------------------------------------------------ [2010-11-09 22:42:04] mathroc at gmail dot com Description: ------------ DOMImplementation might have a registerClass(string $baseclass, string $extendedclass) method similar to DOMDocument::registerNodeClass in order to create custom subclass of DOMDocument with DOMImplementation::createDocument Test script: --------------- $implementation = new DOMImplementation(); $dtd = $implementation->createDocumentType('html'); $implementation->registerClass('DOMDocument', 'My_DOMDocument'); $doc = $implementation->createDocument('http://www.w3.org/1999/xhtml', null, $dtd); echo get_class($doc); Expected result: ---------------- output : My_DOMDocument ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=53286&edit=1

« previous php.bugs (#244375) next »