private function ExtensionNamespaces::_registerExtension in X Autoload 7.5
Parameters
string $name:
string $dir:
3 calls to ExtensionNamespaces::_registerExtension()
- ExtensionNamespaces::registerExtension in src/
Phases/ ExtensionNamespaces.php - Registers the namespaces for a module even though it might be currently disabled, or even though it might be early in the request.
- ExtensionNamespaces::wakeUp in src/
Phases/ ExtensionNamespaces.php - Wake up after a cache fail.
- ExtensionNamespaces::welcomeNewExtension in src/
Phases/ ExtensionNamespaces.php - React to new extensions that were just enabled.
File
- src/
Phases/ ExtensionNamespaces.php, line 180
Class
Namespace
Drupal\xautoload\PhasesCode
private function _registerExtension($name, $dir) {
if (is_dir($lib = $dir . '/lib')) {
$this->finder
->addPsr0('Drupal\\' . $name . '\\', $lib);
$this->finder
->addPearFlat($name . '_', $lib);
}
if (is_dir($src = $dir . '/src')) {
$this->finder
->addPsr4('Drupal\\' . $name . '\\', $src);
}
$this->registered[$name] = TRUE;
}