PEAR::Config suggestion
| From: | James Carr | Date: | Wed, 08 Feb 2006 15:07:18 +0000 |
| Subject: | PEAR::Config suggestion | ||
| Groups: | php.pear.dev php.pear.qa | ||
| Request: | Send a blank email to pear-dev+get-41239@lists.php.net to get a copy of this message | ||
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?
Thanks,
JC