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();
파일 보기 프로젝트 열기: symfony/symfony 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$decorated object A class loader object that implements the findFile() method.

공개 메소드들

메소드 설명
__call ( $method, $args ) Passes through all unknown calls onto the decorated object.
__construct ( string $prefix, object $decorated ) Constructor.
findFile ( string $class ) : string | null Finds a file by class name while caching lookups to WinCache.
loadClass ( string $class ) : boolean | null Loads the given class or interface.
register ( boolean $prepend = false ) Registers this instance as an autoloader.
unregister ( ) Unregisters this instance as an autoloader.

메소드 상세

__call() 공개 메소드

Passes through all unknown calls onto the decorated object.
public __call ( $method, $args )

__construct() 공개 메소드

Constructor.
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.
public findFile ( string $class ) : string | null
$class string A class name to resolve to file
리턴 string | null

loadClass() 공개 메소드

Loads the given class or interface.
public loadClass ( string $class ) : boolean | null
$class string The name of the class
리턴 boolean | null True, if loaded

register() 공개 메소드

Registers this instance as an autoloader.
public register ( boolean $prepend = false )
$prepend boolean Whether to prepend the autoloader or not

unregister() 공개 메소드

Unregisters this instance as an autoloader.
public unregister ( )

프로퍼티 상세

$decorated 보호되어 있는 프로퍼티

A class loader object that implements the findFile() method.
protected object $decorated
리턴 object