function xautoload_InjectedAPI_hookXautoload::namespaceHandler in X Autoload 7.4
Same name and namespace in other branches
- 7.5 legacy/lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::namespaceHandler()
- 7.2 lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::namespaceHandler()
- 7.3 lib/InjectedAPI/hookXautoload.php \xautoload_InjectedAPI_hookXautoload::namespaceHandler()
Legacy: Plugins were called "Handler" before.
Parameters
string $namespace:
xautoload_FinderPlugin_Interface $plugin:
Return value
string The key under which the plugin was registered. This can later be used to unregister the plugin again.
File
- legacy/
lib/ InjectedAPI/ hookXautoload.php, line 192
Class
- xautoload_InjectedAPI_hookXautoload
- An instance of this class is passed around to implementations of hook_xautoload(). It acts as a wrapper around the ClassFinder, to register stuff.
Code
function namespaceHandler($namespace, $plugin) {
$key = Util::randomString();
$this->finder
->registerNamespaceDeep($namespace, $key, $plugin);
return $key;
}