Class ClassLoader
ClassLoader implements a PSR-0 class loader
See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
$loader = new \Composer\Autoload\ClassLoader();
// register classes with namespaces $loader->add('Symfony\Component',
__DIR__.'/component'); $loader->add('Symfony', __DIR__.'/framework');
// activate the autoloader $loader->register();
// to enable searching the include path (eg. for PEAR packages)
$loader->setUseIncludePath(true);
In this example, if you try to use a class in the Symfony\Component namespace or one of its children (Symfony\Component\Console for instance), the autoloader will first look for the class under the component/ directory, and it will then fallback to the framework/ directory if not found before giving up.
This class is loosely based on the Symfony UniversalClassLoader.
Author: Fabien Potencier <fabien@symfony.com>
Author: Jordi Boggiano <j.boggiano@seld.be>
Located at vendor/composer/ClassLoader.php
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
#
getUseIncludePath( )
Can be used to check if the autoloader uses the include path to check for classes. |
public
|
|
public
|
|
public
boolean|null
|
|
public
string|false
|