Elgg  Version 2.3
autoloader.php
Go to the documentation of this file.
1 <?php
17 function _elgg_services(\Elgg\Di\ServiceProvider $services = null) {
18  static $inst;
19  if ($services !== null) {
20  $inst = $services;
21  }
22  return $inst;
23 }
24 
31  _elgg_services()->autoloadManager->deleteCache();
32 }
33 
40  return _elgg_services()->classLoader;
41 }
42 
55 function elgg_register_classes($dir) {
56  _elgg_services()->autoloadManager->addClasses($dir);
57 }
58 
68 function elgg_register_class($class, $location) {
69  _elgg_services()->autoloadManager->setClassPath($class, $location);
70  return true;
71 }
72 
73 return function(\Elgg\EventsService $events, \Elgg\HooksRegistrationService $hooks) {
74  $events->registerHandler('upgrade', 'all', '_elgg_delete_autoload_cache', 600);
75 };
$class
Definition: field.php:20
elgg_get_class_loader()
Get Elgg&#39;s class loader.
Definition: autoloader.php:39
Save menu items.
elgg_register_classes($dir)
Register a directory tree for autoloading classes/interfaces/traits.
Definition: autoloader.php:55
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
Definition: autoloader.php:17
elgg_register_class($class, $location)
Register a classname to a file.
Definition: autoloader.php:68
_elgg_delete_autoload_cache()
Delete the autoload system cache.
Definition: autoloader.php:30