The ClassLoader class handles autoloading of classes in the Mako framework. The autoloader will also autoload PSR-0 compatible classes located in the libraries directory as well as classes from third party libraries installed using composer.
The mapClass method will add a class to the autoloader mappings.
ClassLoader::mapClass('FooBar', '/path/to/FooBar.php');
ClassLoader::mapClass('foo\FooBar', '/path/to/foo/FooBar.php');
The mapClasses method will add an array of classes to the autoloader mappings.
ClassLoader::mapClasses(array ( 'Foo' => '/path/to/Foo.php', 'Bar' => '/path/to/Bar.php', ));
The directory method will add an additional path from which the autoloader will try to load PSR-0 compatible classes.
ClassLoader::directory('/path/to/library');
The registerNamespace method allows you to register a PSR-0 compatible namespace with the autoloader.
ClassLoader::registerNamespace('Zend\XmlRpc', MAKO_LIBRARIES_PATH . '/XmlRpc');