Zend Framework 101: Zend_Loader
In this article I will introduce you to Zend_Loader, a Zend Framework class used to automatically load other classes. Typically you would use include_once() or require_once() when you want to load a class but using Zend_Loader you don't have to.
For class auto-loading to work (see http://php.net/autoload for full details), your classes must be named and filed in an orderly fashion. The Zend_Loader class requires all classes to be named in the same fashion as classes in the Zend Framework.
Zend_Loader treats a class name as a file system path, replacing any underscores with a slash and appending
.php to the end. For example, the class name
Zend_Loader would map to the file system path
This article requires PHP 5.2 or newer and Zend Framework. You can download the Zend Framework from http://framework.zend.com. At time of writing, the current version of Zend Framework is 1.7.6.