implements Phalcon\Events\EventsAwareInterface
This component helps to load your project classes automatically based on some conventions
//Creates the autoloader $loader = new Phalcon\Loader(); //Register some namespaces $loader->registerNamespaces(array( 'Example\Base' => 'vendor/example/base/', 'Example\Adapter' => 'vendor/example/adapter/', 'Example' => 'vendor/example/' )); //register autoloader $loader->register(); //Requiring this class will automatically include file vendor/example/adapter/Some.php $adapter = Example\Adapter\Some();
Phalcon\Loader constructor
Sets the events manager
Returns the internal event manager
Sets an array of extensions that the loader must try in each attempt to locate the file
Return file extensions registered in the loader
Register namespaces and their related directories
Return current namespaces registered in the autoloader
Register directories on which “not found” classes could be found
Return current prefixes registered in the autoloader
Register directories on which “not found” classes could be found
Return current directories registered in the autoloader
Register classes and their locations
Return the current class-map registered in the autoloader
Register the autoload method
Unregister the autoload method
Makes the work of autoload registered classes
Get the path when a class was found
Get the path the loader is checking for a path
© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/2.0.0/api/Phalcon_Loader.html