Re: [PHP] Re: class_is_loadable?

2008-07-07 Thread Eric Butera
On Sun, Jul 6, 2008 at 6:06 AM, Fabrice VIGNALS [EMAIL PROTECTED] wrote: Hi, The problem is not the autoload but the implementation of such function. class_is_loadable mean, hey php look at my class somewhere in my files. PHP should inspect some files, in some directories and list classes.

[PHP] Re: class_is_loadable?

2008-07-06 Thread Fabrice VIGNALS
Hi, The problem is not the autoload but the implementation of such function. class_is_loadable mean, hey php look at my class somewhere in my files. PHP should inspect some files, in some directories and list classes. Which files, which extensions files, in which directories ? ... In my mind

[PHP] Re: class_is_loadable?

2008-07-05 Thread Pulni4kiya
First of all, I don't think using autoload is recommended. If you really want to do it that way, you could check if the file which autoload will try to include exists and if it does, include it and create your object. Actually to make the script more safe, after including the file you should

Re: [PHP] Re: class_is_loadable?

2008-07-05 Thread Larry Garfield
On Saturday 05 July 2008 2:25:20 pm Pulni4kiya wrote: First of all, I don't think using autoload is recommended. Why not? I know there is a performance hit for the lookup time, but for the system I'm working on I have already solved that issue with selective pre-caching. If you really want

Re: [PHP] Re: class_is_loadable?

2008-07-05 Thread Pulni4kiya
Well reimplementing autoloading doesn't seem such a bad idea. With the integrated autoload ...there is one very stupid way of doing what you want. Something like this (I suppose you know which class is the parent of the one that is 'missing'): eval(class $class_name extends THE_PARENT {}); You

Re: [PHP] Re: class_is_loadable?

2008-07-05 Thread Aschwin Wesselius
Pulni4kiya wrote: Well reimplementing autoloading doesn't seem such a bad idea. With the integrated autoload ...there is one very stupid way of doing what you want. Something like this (I suppose you know which class is the parent of the one that is 'missing'): eval(class $class_name extends