php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53286 no way to create an instance of a subclass of DOMDocument with a dtd
Submitted: 2010-11-09 22:42 UTC Modified: -
Votes:5
Avg. Score:4.2 ± 0.4
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:0 (0.0%)
From: mathroc at gmail dot com Assigned:
Status: Open Package: DOM XML related
PHP Version: 5.3.3 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mathroc at gmail dot com
New email:
PHP Version: OS:

 

 [2010-11-09 22:42 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2023-05-05 10:45 UTC] autovehicleblog at gmail dot com
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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 10:01:29 2024 UTC