private function ExtensionNamespaces::_registerExtensionPsr4 in X Autoload 7.5
Parameters
string $name:
string $dir:
string $subdir:
2 calls to ExtensionNamespaces::_registerExtensionPsr4()
- ExtensionNamespaces::registerExtensionPsr4 in src/
Phases/ ExtensionNamespaces.php - Registers the namespace with PSR-4 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.
File
- src/
Phases/ ExtensionNamespaces.php, line 197
Class
Namespace
Drupal\xautoload\PhasesCode
private function _registerExtensionPsr4($name, $dir, $subdir) {
$this->finder
->addPsr4('Drupal\\' . $name . '\\', $dir . '/' . $subdir);
// Re-add the PSR-0 test directory, for consistency's sake.
if (is_dir($lib_tests = $dir . '/lib/Drupal/' . $name . '/Tests')) {
$this->finder
->addPsr0('Drupal\\' . $name . '\\Tests\\', $lib_tests);
}
$this->registered[$name] = 'psr-4';
}