* @copyright Copyright (c) 2013 - 2019, TechFuze. (http://techfuze.net) */ class PluginGetEvent extends Event { /** * The name of the plugin that should be loaded * * @var string */ public string $pluginName; /** * Potential plugin to return instead. If set, the plugins class will return this object * * @var object|null */ public ?object $plugin = null; public function init($pluginName) { $this->pluginName = $pluginName; } /** * Allows listeners to set a plugin that will be returned instead. * * @param object $plugin */ public function setPlugin(object $plugin) { $this->plugin = $plugin; } /** * Plugin that will be returned if set by a listener. * * @return object|null $plugin */ public function getPlugin(): ?object { return $this->plugin; } }