Method | Description | |
---|---|---|
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. |
Method | Description | |
---|---|---|
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. |
public static enableTokenizer ( $bool ) |
public static fixNamespaceDeclarations ( string $source ) : string | ||
$source | string | Namespace string |
return | string | Namespaces with brackets |
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 |
return | array | The source map of inlined classes, with classes as keys and files as values |
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 |