Add PluginManager::hasPlugin method

This commit is contained in:
Dmitriy Simushev 2014-11-28 15:02:16 +00:00
parent 5282e789ba
commit 2bdfebc428

View File

@ -77,6 +77,18 @@ class PluginManager
return $this->loadedPlugins[$plugin_name];
}
/**
* Checks if there is an instance of the plugin in the manager.
*
* @param string $plugin_name Name of the plugin to check
* @return boolean True if the plugin exists in the manager and false
* otherwise.
*/
public function hasPlugin($plugin_name)
{
return isset($this->loadedPlugins[$plugin_name]);
}
/**
* Returns associative array of loaded plugins.
*