16 if (null === $provider) {
34 $dir = dirname(dirname(__FILE__)) .
'/classes';
35 foreach (array(
'Elgg_ClassMap',
'Elgg_ClassLoader',
'Elgg_AutoloadManager') as
$class) {
36 if (!class_exists($class)) {
37 $file =
"{$dir}/" . strtr($class,
'_\\',
'//') .
".php";
39 if (!class_exists($class,
false)) {
40 throw new RuntimeException(
"Could not load {$class} in {$file}.");
65 if (! $manager->loadCache()) {
66 $manager->addClasses(dirname(dirname(__FILE__)) .
'/classes');
130 _elgg_services()->events->registerHandler(
'shutdown',
'system',
'_elgg_save_autoload_cache', 1000);
131 _elgg_services()->events->registerHandler(
'upgrade',
'all',
'_elgg_delete_autoload_cache');
_elgg_load_autoload_cache()
Load cached data into the autoload system.
elgg_get_class_loader()
Get Elgg's class loader.
elgg_register_class($class, $location)
Register a classname to a file.
_elgg_create_service_provider()
Sets up autoloading and creates the service provider (DIC)
elgg_get_system_cache()
Returns an ElggCache object suitable for caching system information.
if(isset($vars['id'])) $class
_elgg_save_autoload_cache()
Save the autoload system cache.
_elgg_delete_autoload_cache()
Delete the autoload system cache.
elgg_register_classes($dir)
Register a directory tree for autoloading classes/interfaces/traits.