class ClassCollectionLoader

ClassCollectionLoader.

Methods

static 
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.

static string
fixNamespaceDeclarations(string $source)

Adds brackets around each namespace if it's not already the case.

static 
enableTokenizer($bool)

This method is only useful for testing.

Details

at line line 37
static 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.

Parameters

array $classes An array of classes to load
string $cacheDir A cache directory
string $name The cache name prefix
Boolean $autoReload Whether to flush the cache when the cache is stale or not
Boolean $adaptive Whether to remove already declared classes or not
string $extension File extension of the resulting file

Exceptions

InvalidArgumentException When class can't be loaded

at line line 137
static string fixNamespaceDeclarations(string $source)

Adds brackets around each namespace if it's not already the case.

Parameters

string $source Namespace string

Return Value

string Namespaces with brackets

at line line 201
static enableTokenizer($bool)

This method is only useful for testing.

Parameters

$bool