Edit report at https://bugs.php.net/bug.php?id=48352&edit=1
ID: 48352 Comment by: kroccamen at gmail dot com Reported by: php at xxlwebdesign dot de Summary: Method registerNodeClass does not work with DOMNodeList Status: Assigned Type: Feature/Change Request Package: DOM XML related Operating System: Gentoo PHP Version: 5.3CVS-2009-05-21 (snap) Assigned To: rrichards Block user comment: N Private report: N New Comment: Iâd like to provide a valid use-case for this bug. I have created an extended DOMDocument that upon __construct also creates an XPath object, that way I can add methods to DOMElement to allow for DOMElement->xpath ('...') instead of using DOMXPath->query ('...', DOMNode). This makes the DOM more chainable and simpler to use without so many temporary variables. What I want to do is extend DOMNodeList so that one function call can apply to all nodes returned from an XPath query, e.g. DOMNode->xpath ('a')->addClass ('link'); Is anybody aware of any other work around that can be used to achieve this same effect? Previous Comments: ------------------------------------------------------------------------ [2011-01-08 05:17:47] mat at homedvd dot ca Any movement on this? The method should probably be called registerNodeListClass ------------------------------------------------------------------------ [2010-02-15 02:45:10] mail at r-site dot net very helpfull, extending DOMNode's almost implies it, pls hurry, ty ------------------------------------------------------------------------ [2009-09-20 21:17:12] goetas at lignano dot it this would be really helpful! ------------------------------------------------------------------------ [2009-05-22 12:53:55] php at xxlwebdesign dot de This would be very nice! ------------------------------------------------------------------------ [2009-05-22 10:49:41] rricha...@php.net This method was designed specifically for DOMNode based classes only. changing to feature request and I will consider and evaluate expanding its functionality. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=48352 -- Edit this bug report at https://bugs.php.net/bug.php?id=48352&edit=1