ApcClassLoader

ApcClassLoader

class ApcClassLoader

ApcClassLoader implements a wrapping autoloader cached in APC for PHP 5.3.

It expects an object implementing a findFile method to find the file. This allows using it as a wrapper around the other loaders of the component (the ClassLoader and the UniversalClassLoader for instance) but also around any other autoloaders following this convention (the Composer one for instance).

// with a Symfony autoloader
use Symfony\Component\ClassLoader\ClassLoader;

$loader = new ClassLoader();
$loader->addPrefix('Symfony\Component', __DIR__.'/component');
$loader->addPrefix('Symfony',           __DIR__.'/framework');

// or with a Composer autoloader
use Composer\Autoload\ClassLoader;

$loader = new ClassLoader();
$loader->add('Symfony\Component', __DIR__.'/component');
$loader->add('Symfony',           __DIR__.'/framework');

$cachedLoader = new ApcCl