function ClassFinder::registerNamespaceDeep in X Autoload 7.4
Same name and namespace in other branches
- 7.5 src/ClassFinder/ClassFinder.php \Drupal\xautoload\ClassFinder\ClassFinder::registerNamespaceDeep()
Alias for registerNamespaceDeepLocation()
Parameters
string $namespace: The namespace, e.g. "My\Namespace"
string $path: The deep path, e.g. "../lib/My/Namespace"
\Drupal\xautoload\DirectoryBehavior\DirectoryBehaviorInterface $behavior: If TRUE, then we are not sure if the directory at $path actually exists. If during the process we find the directory to be nonexistent, we unregister the path.
Overrides ExtendedClassFinderInterface::registerNamespaceDeep
File
- lib/
ClassFinder/ ClassFinder.php, line 323
Class
Namespace
Drupal\xautoload\ClassFinderCode
function registerNamespaceDeep($namespace, $path, $behavior = NULL) {
if (!isset($behavior)) {
$behavior = $this->defaultBehavior;
}
$logical_base_path = Util::namespaceLogicalPath($namespace);
$deep_path = strlen($path) ? $path . '/' : '';
$this->namespaceMap
->registerDeepPath($logical_base_path, $deep_path, $behavior);
}