32 $inactiveModules =
false;
36 $available = self::getPlugins($pluginName, $inactiveModules);
37 if (!in_array(
$dirname, array_keys($available))) {
49 public static function getPlugins($pluginName =
'system', $inactiveModules =
false)
51 static $plugins = array();
52 if (!isset($plugins[$pluginName])) {
53 $plugins[$pluginName] = array();
58 return $plugins[$pluginName];
61 $dirnames =
$xoops->getActiveModules();
62 if (is_array($inactiveModules)) {
63 $dirnames = array_merge($dirnames, $inactiveModules);
67 $className =
'\\' . ucfirst($dirname) . ucfirst($pluginName) .
'Plugin';
68 $interface =
'\\' . ucfirst($pluginName) .
'PluginInterface';
69 $class =
new $className($dirname);
70 if ($class instanceof \
Xoops\Module\
Plugin\PluginAbstract && $class instanceof $interface) {
71 $plugins[$pluginName][
$dirname] = $class;
76 return $plugins[$pluginName];
static getPlugin($dirname, $pluginName= 'system', $force=false)
static getPlugins($pluginName= 'system', $inactiveModules=false)
static loadFile($file, $once=true)