Re: Fwd: [PHP] question regarding Reflection
| From: | Jochem Maas | Date: | Thu, 03 Nov 2005 09:58:00 +0000 |
| Subject: | Re: Fwd: [PHP] question regarding Reflection | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-225035@lists.php.net to get a copy of this message | ||
Manish Marathe wrote:
On 11/2/05, Jochem Maas <jochem@iamjochem.com> wrote:how does php know you want to load a file/class? you still have to have a line which does something like: include_once "{$argv[1]}.class.php"; with regard to the rest of the ideas I proposed ... just take it one step at a time ... before you know it you'll have something alot more complex that you might ahve first imagined! and besides 'noob' might not be an appropriate title for someone messing around with code generation and reflection :-)Manish Marathe wrote:ThanksSorry for spamming but I didn't mean to reply you privately :(I did it myself by accident 2 minutes ago :-) no probs.I am sorry if I have hurted anyone's feelings here but by foolish simply au contraire. I don't think anyone was hurt.:) No, I was just emotionally black-mailing but in essence, I meant something which is not in best practices Is it possible to keep all theWell, I saw my php.ini earlier and I guess '.' the current directory is included in the path, so kept the file which had a class (Company) for which I wished to generate test cases in the same directory as my script ( TestGenerator.php) dir and then just tried to execute like: php TestGenerator.php Company And I didn't include Company.php in TestGenerator.php thinking that PHP will find that class since the file is in the path.class files somewhere in the path where PHP can look for and I don't have to include in my script.php.ini setting include_path - its a simple concept, /^RT(?:F)?M$/.