Add getAllPlugins() method to PluginManager

This commit is contained in:
Luke Towers 2020-08-27 15:47:42 -06:00
parent 19ebc8854e
commit 6b214edf1f
1 changed files with 11 additions and 2 deletions

View File

@ -346,15 +346,24 @@ class PluginManager
/**
* Returns an array with all enabled plugins
* The index is the plugin namespace, the value is the plugin information object.
*
* @return array
* @return array [$code => $pluginObj]
*/
public function getPlugins()
{
return array_diff_key($this->plugins, $this->disabledPlugins);
}
/**
* Returns an array will all plugins detected on the filesystem
*
* @return array [$code => $pluginObj]
*/
public function getAllPlugins()
{
return $this->plugins;
}
/**
* Returns a plugin registration class based on its namespace (Author\Plugin).
*