PHP 클래스 Symfony\Component\ClassLoader\XcacheClassLoader
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 autoloader following this convention (the Composer one for instance)
$loader = new ClassLoader();
register classes with namespaces
$loader->add('Symfony\Component', __DIR__.'/component');
$loader->add('Symfony', __DIR__.'/framework');
$cachedLoader = new XcacheClassLoader('my_prefix', $loader);
activate the cached autoloader
$cachedLoader->register();
eventually deactivate the non-cached loader if it was registered previously
to be sure to use the cached one.
$loader->unregister();
파일 보기
프로젝트 열기: symfony/symfony
1 사용 예제들
공개 메소드들
메소드 상세
Passes through all unknown calls onto the decorated object.
public __call ( $method, $args ) |
public __construct ( string $prefix, object $decorated ) |
$prefix |
string |
The XCache namespace prefix to use |
$decorated |
object |
A class loader object that implements the findFile() method |
Finds a file by class name while caching lookups to Xcache.
Loads the given class or interface.
Registers this instance as an autoloader.
Unregisters this instance as an autoloader.