-- awkaiser <[email protected]> wrote (on Thursday, 26 February 2009, 03:13 PM -0800): > Second, in case it makes a difference, I'm using ZF 1.7.6 with the addition > of the following incubator files: > > /Zend/Application/Module/Autoloader.php > /Zend/Loader/Autoloader.php > /Zend/Loader/Autoloader/Interface.php > /Zend/Loader/Autoloader/Resource.php > > Do I need to add/update anything else?
Grab Zend_Loader from trunk, as it has a few changes. > Matthew Weier O'Phinney-3 wrote: > > > > Zend_Loader_Autoloader was created in part to solve the very issue you > > see above. Which may seem ironic, but let me explain. > > > > =^D > > > Matthew Weier O'Phinney-3 wrote: > > > > Zend_Loader_Autoloader gives you the _option_ of suppressing those > > errors. This way you can see what paths are tried, as well as any actual > > issues with the class files being loaded. Once you go to production, > > however, you can suppress those errors. > > > > To suppress the errors, grab the autoloader instance, and call the > > suppressNotFoundWarnings() method with a boolean true argument: > > > > Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(true); > > > > Unfortunately, this doesn't suppress the Zend_Loader errors I'm seeing. I > tried running it in a few locations (bootstrap + before and after > Zend_Application_Module_Autoloader instances) - no dice. It won't suppress them in your logs, but it will suppress them from displaying if you have display_errors on. (There's actually a test for this behavior.) > Matthew Weier O'Phinney-3 wrote: > > > > BTW, you might want to look at the "Module" variant, as it has a lot of > > this stuff already setup for you: > > > > $loader = new Zend_Application_Module_Autoloader(array( > > 'namespace' => 'Projects', > > 'basePath' => dirname(__FILE__) . '/..', > > )); > > > > Thanks! A small shortcut, but appreciated nonetheless. =) It was the primary use case, actually, but when we reviewed the proposals, we decided that we should make a generic version with no defined resources, and then another targetting Zend_Application (which by default targets the recommended project structure). > Matthew Weier O'Phinney-3 wrote: > > From what you're describing, it may be that the resource autoloaders are > > not properly being called prior to the main autoloader instance. I'll > > look into this in the next few days and see if that's the case. > > That sounds plausible. I look forward to your response. I'll try and look into it first thing tomorrow. -- Matthew Weier O'Phinney Software Architect | [email protected] Zend Framework | http://framework.zend.com/
