[PHP] Re: Project-browser-function / required/included

2004-07-22 Thread Jason Barnett
Hmmm... this may be difficult to implement.  For simple include/require trees it 
could be done quite easily... but __autoload opens up a whole other bag of 
worms.  But now that I think of it I suppose you could create Reflections and 
get the location of class defintions from that.  This might fit with something 
else I'm working on, I'll report back here if I come up with something useful.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Project-browser-function / required/included

2004-07-22 Thread Frank Munch
Hi,
thanks for your comment. Right, and similarly, it struck me that in case 
there are variable-names in the path, like in

require_once $my_lib_dir . some_funcs.php;
the variable $my_lib_dir could only be known at run-time and not by any 
simple script just scanning the source.

Still, it would be possible to deliver a variable_name=value  to the 
traversing function which would be good enough in most cases.

May get around to it one day...
Frank

At 06:46 PM 7/22/2004, Jason Barnett wrote:
Hmmm... this may be difficult to implement.  For simple include/require 
trees it could be done quite easily... but __autoload opens up a whole 
other bag of worms.  But now that I think of it I suppose you could create 
Reflections and get the location of class defintions from that.  This 
might fit with something else I'm working on, I'll report back here if I 
come up with something useful.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Project-browser-function / required/included

2004-07-22 Thread Jason Barnett
Frank Munch wrote:
Hi,
thanks for your comment. Right, and similarly, it struck me that in case 
there are variable-names in the path, like in

require_once $my_lib_dir . some_funcs.php;
the variable $my_lib_dir could only be known at run-time and not by any 
simple script just scanning the source.

True - and if you had a script that actually changed $my_lib_dir then this could 
be a real mess.  But if in your function you actually include the file you're 
trying to parse then you can know the value at runtime.  But consider this:

require_once dirname(__FILE__) . 'some_funcs.php';
Interpreting that one is a little tougher... still might get around to it...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Project-browser-function / required/included

2004-07-22 Thread Justin Patrin
On Thu, 22 Jul 2004 22:22:28 +0700, Frank Munch [EMAIL PROTECTED] wrote:
 
 Hi,
 
 thanks for your comment. Right, and similarly, it struck me that in case
 there are variable-names in the path, like in
 
 require_once $my_lib_dir . some_funcs.php;
 
 the variable $my_lib_dir could only be known at run-time and not by any
 simple script just scanning the source.
 

And even worse, at work I use ini_set to set up my include_path so
that's it goes for dev code if in dev and live code if live.

 Still, it would be possible to deliver a variable_name=value  to the
 traversing function which would be good enough in most cases.
 
 May get around to it one day...
 
 Frank
 
 
 
 
 At 06:46 PM 7/22/2004, Jason Barnett wrote:
 Hmmm... this may be difficult to implement.  For simple include/require
 trees it could be done quite easily... but __autoload opens up a whole
 other bag of worms.  But now that I think of it I suppose you could create
 Reflections and get the location of class defintions from that.  This
 might fit with something else I'm working on, I'll report back here if I
 come up with something useful.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php