function xautoload_ClassFinder_NamespaceOrPrefix::registerNamespacePlugin in X Autoload 7.3
Same name and namespace in other branches
- 7.2 lib/ClassFinder/NamespaceOrPrefix.php \xautoload_ClassFinder_NamespaceOrPrefix::registerNamespacePlugin()
Register a plugin for a namespace.
Parameters
string $namespace: The namespace, e.g. "My\Library"
xautoload_FinderPlugin_Interface $plugin: The plugin.
string $base_dir: Optional base path.
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 127
Class
Code
function registerNamespacePlugin($namespace, $plugin, $base_dir = NULL) {
$namespace_path_fragment = $this
->namespacePathFragment($namespace);
$this->namespaceMap
->registerPlugin($namespace_path_fragment, $plugin, $base_dir);
}