PHP Класс Symfony\Component\ClassLoader\WinCacheClassLoader
It expects an object implementing a findFile method to find the file. This
allow 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 WinCacheClassLoader('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();
Показать файл
Открыть проект
Примеры использования класса
Защищенные свойства (Protected)
Свойство |
Тип |
Описание |
|
$decorated |
object |
A class loader object that implements the findFile() method. |
|
Открытые методы
Описание методов
Passes through all unknown calls onto the decorated object.
public __call ( $method, $args ) |
__construct()
публичный Метод
public __construct ( string $prefix, object $decorated ) |
$prefix |
string |
The WinCache namespace prefix to use |
$decorated |
object |
A class loader object that implements the findFile() method |
findFile()
публичный Метод
Finds a file by class name while caching lookups to WinCache.
loadClass()
публичный Метод
Loads the given class or interface.
register()
публичный Метод
Registers this instance as an autoloader.
unregister()
публичный Метод
Unregisters this instance as an autoloader.
Описание свойств
$decorated защищенное свойство
A class loader object that implements the findFile() method.
protected object $decorated |
Результат |
object |
|