Elgg
Version 1.9
|
Public Member Functions | |
__construct (Elgg_ClassLoader $loader) | |
Constructor. More... | |
addClasses ($dir) | |
Add classes found in this directory to the class map and allow classes in subdirectories to be found by PSR-0 rules. More... | |
setClassPath ($class, $path) | |
Register the location of a class on the class map. More... | |
saveCache () | |
If necessary, save necessary state details. More... | |
loadCache () | |
Set the state of the manager from the cache. More... | |
deleteCache () | |
Delete the cache file. More... | |
getLoader () | |
Get the class loader. More... | |
setStorage (ElggCache $storage) | |
Set the cache storage object. More... | |
Public Attributes | |
const | FILENAME = 'autoload_data.php' |
const | KEY_CLASSES = 'classes' |
const | KEY_SCANNED_DIRS = 'scannedDirs' |
Protected Member Functions | |
scanClassesDir ($dir) | |
Scan (non-recursively) a /classes directory for PHP files to map directly to classes. More... | |
getSpec () | |
Some method that does something. More... | |
Protected Attributes | |
$loader | |
$scannedDirs = array() | |
$altered = false | |
$storage = null | |
Definition at line 10 of file AutoloadManager.php.
Elgg_AutoloadManager::__construct | ( | Elgg_ClassLoader | $loader | ) |
Constructor.
Elgg_ClassLoader | $loader | Class loader object |
Definition at line 41 of file AutoloadManager.php.
Elgg_AutoloadManager::addClasses | ( | $dir | ) |
Add classes found in this directory to the class map and allow classes in subdirectories to be found by PSR-0 rules.
We keep track of which dirs were scanned on previous requests so we don't need to rescan unless the cache is emptied.
string | $dir | Directory of classes |
Definition at line 55 of file AutoloadManager.php.
Elgg_AutoloadManager::deleteCache | ( | ) |
Delete the cache file.
Definition at line 170 of file AutoloadManager.php.
Elgg_AutoloadManager::getLoader | ( | ) |
|
protected |
Some method that does something.
Definition at line 152 of file AutoloadManager.php.
Elgg_AutoloadManager::loadCache | ( | ) |
Set the state of the manager from the cache.
Definition at line 131 of file AutoloadManager.php.
Elgg_AutoloadManager::saveCache | ( | ) |
If necessary, save necessary state details.
Definition at line 114 of file AutoloadManager.php.
|
protected |
Scan (non-recursively) a /classes directory for PHP files to map directly to classes.
For BC with Elgg 1.8's autoloader we map these files directly, but besides this the autoloader is PSR-0 compatible.
string | $dir | Directory of classes |
Definition at line 75 of file AutoloadManager.php.
Elgg_AutoloadManager::setClassPath | ( | $class, | |
$path | |||
) |
Register the location of a class on the class map.
string | $class | Class name |
string | $path | Path of class file |
Definition at line 104 of file AutoloadManager.php.
Elgg_AutoloadManager::setStorage | ( | ElggCache | $storage | ) |
Set the cache storage object.
ElggCache | $storage | Cache object |
Definition at line 192 of file AutoloadManager.php.
|
protected |
Definition at line 29 of file AutoloadManager.php.
|
protected |
Definition at line 19 of file AutoloadManager.php.
|
protected |
Definition at line 24 of file AutoloadManager.php.
|
protected |
Definition at line 34 of file AutoloadManager.php.
const Elgg_AutoloadManager::FILENAME = 'autoload_data.php' |
Definition at line 12 of file AutoloadManager.php.
const Elgg_AutoloadManager::KEY_CLASSES = 'classes' |
Definition at line 13 of file AutoloadManager.php.
const Elgg_AutoloadManager::KEY_SCANNED_DIRS = 'scannedDirs' |
Definition at line 14 of file AutoloadManager.php.