Re: PEAR::Config suggestion

From: Date: Wed, 08 Feb 2006 23:22:36 +0000
Subject: Re: PEAR::Config suggestion
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41255@lists.php.net to get a copy of this message
On Wed, 2006-02-08 at 09:07 -0600, James Carr wrote: > Hi, > > I recently started using PEAR::Config due to it's description of using > XPath like searches, but sadly found out this isn't true (for the most > part). For example, to get a path directive under 'Paths' with an > attribute name that equals 'root', I have to do the following > tomfoolery: > > $directive = $conf->searchPath( array('Paths', array('path', > array('name' => 'root')))); > echo $directive->getContent(); > > I think it would be nice to take some kind of XPath parser and use it > in a class that wraps Config_Container, allowing lookups like: > $directive = $conf->searchPath('/Paths/path[@name="root"]'); > echo $directive->getContent(); > > Thoughts? Sounds good, send us an implementation and I'll look at adding it to the Config package. Tho I must say doing something about that named root node is on my list of things to fix with Config. It's already causing problems with conversion to and from various formats, especially the generic xml one. Adam

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
« previous php.pear.dev (#41255) next »