ClassLoader deprecated
ClassLoader deprecated
class ClassLoader
deprecated
ClassLoader implements an PSR-0 class loader.
See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
$loader = new ClassLoader();
// register classes with namespaces
$loader->addPrefix('Symfony\Component', __DIR__.'/component');
$loader->addPrefix('Symfony', __DIR__.'/framework');
// activate the autoloader
$loader->register();
// to enable searching the include path (e.g. 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),