plugin = $plugin; $this->pluginCodeObj = $pluginCodeObj; } public static function createFromPluginCode($pluginCode) { $pluginCodeObj = new PluginCode($pluginCode); $plugins = PluginManager::instance()->getPlugins(); foreach ($plugins as $code=>$plugin) { if ($code == $pluginCode) { return new PluginVector($plugin, $pluginCodeObj); } } return null; } public function getPluginName() { if (!$this->plugin) { return null; } $pluginInfo = $this->plugin->pluginDetails(); if (!isset($pluginInfo['name'])) { return null; } return $pluginInfo['name']; } }