PHP 클래스 Symfony\Component\ClassLoader\ClassCollectionLoader

저자: Fabien Potencier ([email protected])
파일 보기 프로젝트 열기: symfony/class-loader 1 사용 예제들

공개 메소드들

메소드 설명
enableTokenizer ( $bool ) This method is only useful for testing.
fixNamespaceDeclarations ( string $source ) : string Adds brackets around each namespace if it's not already the case.
inline ( array $classes, string $cache, array $excluded ) : array Generates a file where classes and their parents are inlined.
load ( array $classes, string $cacheDir, string $name, boolean $autoReload, boolean $adaptive = false, string $extension = '.php' ) Loads a list of classes and caches them in one big file.

비공개 메소드들

메소드 설명
compressCode ( string $code ) : string Strips leading & trailing ws, multiple EOL, multiple ws.
computeTraitDeps ( ReflectionClass $class )
getClassHierarchy ( ReflectionClass $class )
getInterfaces ( ReflectionClass $class )
getOrderedClasses ( array $classes ) : ReflectionClass[] Gets an ordered array of passed classes including all their dependencies.
resolveDependencies ( array $tree, ReflectionClass $node, ArrayObject $resolved = null, ArrayObject $unresolved = null ) : ArrayObject Dependencies resolution.
writeCacheFile ( string $file, string $content ) Writes a cache file.

메소드 상세

enableTokenizer() 공개 정적인 메소드

This method is only useful for testing.
public static enableTokenizer ( $bool )

fixNamespaceDeclarations() 공개 정적인 메소드

Adds brackets around each namespace if it's not already the case.
public static fixNamespaceDeclarations ( string $source ) : string
$source string Namespace string
리턴 string Namespaces with brackets

inline() 공개 정적인 메소드

Generates a file where classes and their parents are inlined.
public static inline ( array $classes, string $cache, array $excluded ) : array
$classes array An array of classes to load
$cache string The file where classes are inlined
$excluded array An array of classes that won't be inlined
리턴 array The source map of inlined classes, with classes as keys and files as values

load() 공개 정적인 메소드

Loads a list of classes and caches them in one big file.
public static load ( array $classes, string $cacheDir, string $name, boolean $autoReload, boolean $adaptive = false, string $extension = '.php' )
$classes array An array of classes to load
$cacheDir string A cache directory
$name string The cache name prefix
$autoReload boolean Whether to flush the cache when the cache is stale or not
$adaptive boolean Whether to remove already declared classes or not
$extension string File extension of the resulting file