[PHP] Re: Extending DOMNode

2007-02-15 Thread Rob Richards
Eli wrote: Rob Richards wrote: Due to the internals of the DOM extension, you need to register the class types that are actually instantiated and not the underlying base DOMNode class. Unfortunately in your case this means you need to register all of those classes separately. $dom->registerN

Re: [PHP] Re: Extending DOMNode

2007-02-15 Thread Jochem Maas
Eli wrote: > Jochem Maas wrote: >> maybe the runkit extension can help - no idea how big it might explode >> in your >> face if you try to hack the DOM* stuff with runkit :-) >> >> you never stated why you want to extend all the DOM classes, maybe there >> is a different way of achieving what you w

Re: [PHP] Re: Extending DOMNode

2007-02-15 Thread Eli
Jochem Maas wrote: maybe the runkit extension can help - no idea how big it might explode in your face if you try to hack the DOM* stuff with runkit :-) you never stated why you want to extend all the DOM classes, maybe there is a different way of achieving what you want (i.e. without going thro

Re: [PHP] Re: Extending DOMNode

2007-02-15 Thread Jochem Maas
Eli wrote: > Rob Richards wrote: >> Due to the internals of the DOM extension, you need to register the >> class types that are actually instantiated and not the underlying base >> DOMNode class. Unfortunately in your case this means you need to >> register all of those classes separately. >> >> $d

[PHP] Re: Extending DOMNode

2007-02-15 Thread Eli
Rob Richards wrote: Due to the internals of the DOM extension, you need to register the class types that are actually instantiated and not the underlying base DOMNode class. Unfortunately in your case this means you need to register all of those classes separately. $dom->registerNodeClass('DO

[PHP] Re: Extending DOMNode

2007-02-15 Thread Rob Richards
Eli wrote: registerNodeClass('DOMNode','MyDOMNode'); $dom->loadXML(''); echo $dom->firstChild->v; #<-- not outputs 10 ?> But I get the notice: PHP Notice: Undefined property: DOMElement::$v in ... I want the extension to be valid for all DOM nodes that are derived from DOMNode, such as DOM