function xautoload_ClassFinder_NamespaceOrPrefix::registerNamespacePlugin in X Autoload 7.2
Same name and namespace in other branches
- 7.3 lib/ClassFinder/NamespaceOrPrefix.php \xautoload_ClassFinder_NamespaceOrPrefix::registerNamespacePlugin()
Register a plugin for a namespace.
Parameters
string $namespace: The namespace, e.g. "My\Library"
xautoload_Plugin_Interface $plugin: The plugin.
1 call to xautoload_ClassFinder_NamespaceOrPrefix::registerNamespacePlugin()
- xautoload_ClassFinder_NamespaceOrPrefix::registerNamespaceHandler in lib/
ClassFinder/ NamespaceOrPrefix.php - Legacy: Plugins were called Handlers before.
File
- lib/
ClassFinder/ NamespaceOrPrefix.php, line 88
Class
Code
function registerNamespacePlugin($namespace, $plugin) {
$path_prefix_symbolic = strlen($namespace) ? str_replace('\\', DIRECTORY_SEPARATOR, $namespace . '\\') : '';
$this->namespaceMap
->registerNamespacePlugin($path_prefix_symbolic, $plugin);
}