Why these 2 lines in Zend Bootstrap autoloading function?

The second line is kind of workaround for cases when standard structure autoloader is not enough, and should be avoided, because it slows things down (even if sometimes it is very handy) Looks like the fallback autoloader will not be available in ZF 2.0 Matthew Weier O'Phinney talks about "Autoloading Benchmarks.

The second line is kind of workaround for cases when standard structure autoloader is not enough, and should be avoided, because it slows things down (even if sometimes it is very handy). Looks like the fallback autoloader will not be available in ZF 2.0. Matthew Weier O'Phinney talks about "Autoloading Benchmarks.

It will cause the specified autoloader to be used for any namespace and classes that are not namespaced, effectively ignoring 'namespace' parameter if no autoloader for that namespace is defined. It is appropriate to use $autoloader->setFallbackAutoloader(true) when you have classes that do not belong to a namespace, or you need to use classes across many different namespaces.

Jblue: updated my answer with response to your second question. – vls Dec 9 '10 at 23:29.

First line is trivial, second line is mentioned at the manual: It means, that the Zend Autoloader will try to (auto)load every class, not only the classes mentioned as prefix, or registered Autoloader.

The first is to get the instance of the autoloader, that is it. As the autoloader is a singleton it can only have one instance. If that instance doesn't exist yet, it will be created.

The second line is to have the autoloader act as a catch all - whenever something isn't found, the autoloader is triggered.

1 It's the right approach or not depending on your approach. If you need it, use it, if not don't. – balupton Dec 9 '10 at 23:24.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions