I know of this problem too, I actually started working on a proposal for an
autoloader that would "play nice" with other autoloaders.

http://framework.zend.com/wiki/display/ZFPROP/Zend_Loader_Autoloader+-+Ralph
+Schindler

In short, it would allow you to register a namepsace "prefix" that would
only trigger a set of autoloaders and it allows you to manage the order the
autoloaders are executed in.

Not complete, but I think in the proposal you can see which direction it was
going in.

-ralph


On 12/2/08 11:32 AM, "Jack Sleight" <[EMAIL PROTECTED]> wrote:

> Hi Till,
> Yeah, I should probably write some more details about the script, will
> do a blog post when I get a chance. Basically the script solves two
> problems.
> 
> Firstly, as you may have seen, there's been a lot of discussion about
> removing all the require_once statements from ZF, in order to improve
> performance. The script will remove all of these calls, which will of
> course mean you have to use an autoloader.
> 
> The second problem is that at present, it is not possible to use your
> own class loader with ZF (which is something I want to do). This is
> because there are many calls to Zend_Loader::loadClass() hard coded
> within various ZF components. To solve this the script will replace
> all such calls with spl_autoload_call, allowing you to use any class
> loader you like.
> 
> However, there is one last problem with using your own class loader.
> There are still some components of ZF that rely on the ZF library path
> to be in the PHP include_path, but if you're using your own class
> loader there's no reason to assume the ZF path will be in the
> include_path. These problem components are Zend_Cache,
> Zend_Loader_PluginLoader and Zend_Memory, and the script will "fix"
> these calls so that they also use spl_autoload_call.
> 
> When I said "fix" I didn't mean ZF was broken, only that it doesn't
> work when you want to use it in this way.
> 
> I posted details of my class loader earlier in this thread if you're
> interested.

-- 
Ralph Schindler
Software Engineer     | [EMAIL PROTECTED]
Zend Framework        | http://framework.zend.com/


Reply via email to