note 64339 added to language.oop5.overloading

From: Date: Wed, 12 Apr 2006 17:52:04 +0000
Subject: note 64339 added to language.oop5.overloading
Groups: php.notes 
Request: Send a blank email to php-notes+get-107899@lists.php.net to get a copy of this message
Regarding the post by TJ earlier, about the problems extending DOMElement. Yes, it is true that you can't set extDOMElement::ownerDocument directly; however, you could append the extDOMElement to a DOMDocument in __construct(), which indirectly sets ownerDocument. It should work something like so: class extDOMElement extends DOMElement { public function __construct(DOMDocument $doc) { $doc->appendChild($this); //extDOMElement::ownerDocument is now equal to the object that $doc points to } } Now, I admit I've never actually needed to do this, but I see no reason why it shouldn't work. ---- Server IP: 216.194.113.175 Probable Submitter: 209.103.222.35 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.overloading.php Edit -- http://master.php.net/note/edit/64339 Del: integrated -- http://master.php.net/note/delete/64339/integrated Del: useless -- http://master.php.net/note/delete/64339/useless Del: bad code -- http://master.php.net/note/delete/64339/bad+code Del: spam -- http://master.php.net/note/delete/64339/spam Del: non-english -- http://master.php.net/note/delete/64339/non-english Del: in docs -- http://master.php.net/note/delete/64339/in+docs Del: other reasons-- http://master.php.net/note/delete/64339 Reject -- http://master.php.net/note/reject/64339 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107899) next »