Thanks guys! I will be reading Matthew's Dev Zone article this evening.
Regarding registerNamespace(). How exactly does this work? What is the
advantage? For example I'm using an Amazon SimpleDb library. I keep it in
the same library directory next to my Zend (framework) directory. The
library directory is on the include path. All the class names in the Amazon
directory begin with Amazon_ and use the same naming conventions as the Zend
Framework. Should I registerNamespace('Amazon_') and forego using the
setFallbackAutoloader(true) ?
Thanks again!
J
On Sat, May 2, 2009 at 4:30 PM, Matthew Weier O'Phinney <[email protected]>wrote:
> -- David Mintz <[email protected]> wrote
> (on Saturday, 02 May 2009, 08:54 AM -0400):
> > On Sat, May 2, 2009 at 8:50 AM, Matthew Weier O'Phinney <
> [email protected]>
> > wrote:
> > -- J DeBord <[email protected]> wrote
> > (on Saturday, 02 May 2009, 11:32 AM +0200):
> > > To make Zend_Loader_Autoloader match the functionality of this:
> > >
> > > require_once "Zend/Loader.php";
> > > Zend_Loader::registerAutoload();
> > >
> > > Would you do this? :
> > >
> > > require_once 'Zend/Loader/Autoloader.php';
> > > $autoloader = Zend_Loader_Autoloader::getInstance();
> > > $autoloader->setFallbackAutoloader(true);
> >
> > Yes, though the last line can be omitted if you're not using any
> > libraries outside of Zend_ or ZendX_ trees. Or, if you know the exact
> > namespaces of any other libraries, register them:
> >
> > $autoloader->registerNamespace(array('Foo_', 'Bar_'));
> >
> > If we could stick a sticky on this little thread...! I can promise this
> will
> > get asked a lot as people's apps blow up following upgrade to 1.8
>
> I'll add it to the FAQ and release notes.
>
> The article I wrote for devzone yesterday appears to be helping the
> transition for many, however.
>
> --
> Matthew Weier O'Phinney
> Project Lead | [email protected]
> Zend Framework | http://framework.zend.com/
>