Wallogit.com
2017 © Pedro Peláez
Implementation of the SPL autoload mechanism
Since PHP 5.1.2 introduced the possibility to load class files dynamically at runtime, it is a wide used functionality and core of most PHP Frameworks. Jm uses autoloading too. Therefore all other Jm packages will depend on Jm_Autoloader., (*1)
To install Jm_Autoloader you can use the PEAR installer or get a tarball and install the files manually., (*2)
If you haven't discovered my pear channel yet you'll have to do it. Also you should issue a channel update:, (*3)
pear channel-discover metashock.de/pear pear channel-update metashock
After this you can install Jm_Autoloader. Note that if you installed one of the other Jm packages before it is likely that you have already installed Jm_Autoloader as its a dependency of the most jAm packages. The following command will install the lastest stable version:, (*4)
pear install -a metashock/Jm_Autoloader
If you want to install a specific version or a beta version you'll have to specify this version on the command line. For example:, (*5)
pear install -a metashock/Jm_Autoloader-0.3.0
Alternatively, you can just download the package from http://www.metashock.de/pear and put into a folder listed in your include_path. Please refer to the php.net documentation of the include_path directive., (*6)
The API docs can be found here:, (*7)
http://metashock.de/docs/api/Jm/Autoloader/index.html
Currently the J@m; Autoloader only supports the PEAR style naming scheme that uses underscores to separate between package names and classnames. This is the scheme used to code J@m; itself., (*8)
For example the Autolader expects the following class in a file name View/Html/Table.php, (*9)
class View_Html_Table {
// ...
If you use the default configuration, Jm_Autoloader will search in paths listed in ini_get('include_path');. You can add paths using the methods addPath and prependPath., (*10)