I’m guessing this line registers the autoload function, which in turn loads needed Zend classes.
Zend_Loader::registerAutoload();
My question: is this line meant to be used in applications that call some zend components but aren’t fully zend applications? or is needed also in applications that are fully zend and use zend MVC?
Well, first we should note that
Zend_Loader::registerAutload()is deprecated (since 1.8.0). Better is:What this does is register an SPL
__autoload($classname)function that attempts load classes when they are called for but not-yet-loaded. The default behavior of this autoloader in a non-framework application is to map a class name to a file name (relative to the currently definedinclude_path) andinclude()that file in the hopes that the requested class will be defined there.The specific mapping uses the PEAR 1-class-1-file convention in which a class named something like
My_ComponentName_ClassNamewill reside in the fileMy/ComponentName/ClassName.php.See this answer for more details.