ID: 33589
Updated by: [EMAIL PROTECTED]
Reported By: timo dot hummel at 4fb dot de
-Status: Open
+Status: Bogus
Bug Type: DOM XML related
Operating System: any
PHP Version: 4.3.11
New Comment:
indeed, does not work in PHP 4.x. Never did, never will. Use
PHP 5, where you can do that (with some reservation, but does
work)
Previous Comments:
------------------------------------------------------------------------
[2005-07-06 14:48:19] timo dot hummel at 4fb dot de
Description:
------------
Subclassing the classes provided by the DOMXML-Extension doesn't work.
The usual approach building object-oriented applications is that the
developer can subclass classes to save work and increase reliabilty of
their applications.
DOMXML doesn't seem to support that, see the reproduce code below.
Of course, a developer could create a private property of the class
TestElement and assign DomElement to this, but this is not the idea
behind classes and objects and should be avoided (as this would also
cause problems with multiple specialisation of classes, e.g. if
TestElement would be specialized more);
Reproduce code:
---------------
Test case:
<?php
class TestElement extends DomElement
{
function TestElement
{
/* This doesn't work */
DomElement::DomElement("test");
/* This also doesn't work */
parent::DomElement("test");
}
}
?>
However, this works:
<?php
$element = new DomElement("test");
?>
Actual result:
--------------
Warning: domelement(): Underlying object missing in <file>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33589&edit=1