BTW. Davey should should be tarred and feathered for using auto_prepend_file, heaven for making a project incomprehensible.. :)
This is the *only* way to make this automatically work for *.pds files without needing mod_rewrite or some such. the functionality is there, we we should use it.
Although, it should just as easily work with: require_once 'path/to/PDS.php'; will need to test that though.
I'm not keen to see too much implementation specific code in pear, to me it's always been a set of libraries that are flexible due to their nature of being implemenation neutral. (well tries anyway)
following this idea the end users can then use your class in a prepend file (if they have to), or just write a wrapper so http//localhost/pds.php/somedir/xxx/yyy.php works.. - that's up to them...
require_once 'path/to/PDS.php';
$file = 'xxx';
$pds = new PDS(array('filename'=>$file, 'someOption'=>'xxx'));
$stucture = PHP_Parser;
$data = $parser->parse($file);
$templateEngine->render($data); // pseudo code - basically independant rendering of layout!!
echo $pds->toHtml(0,-1); // eg render it all... --
means it could be used with any application...
although alot of my gtk classes (and a few other pear packages) currently break this general idea
Regards
Alan
- Davey
--
Can you help out?
Need Consulting Services or Know of a Job?
http://www.akbkhome.com