1: <?php
2: /**
3: * ManiaLive - TrackMania dedicated server manager in PHP
4: *
5: * @copyright Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
6: * @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
7: * @version $Revision: 280 $:
8: * @author $Author: martin.gwendal $:
9: * @date $Date: 2011-11-07 19:21:52 +0100 (lun., 07 nov. 2011) $:
10: */
11:
12: namespace ManiaLive\PluginHandler;
13:
14: class Event extends \ManiaLive\Event\Event
15: {
16: const ON_PLUGIN_LOADED = 1;
17: const ON_PLUGIN_UNLOADED = 2;
18:
19: protected $pluginId;
20:
21: function __construct($onWhat, $pluginId)
22: {
23: parent::__construct($onWhat);
24: $this->pluginId = $pluginId;
25: }
26:
27: function fireDo($listener)
28: {
29: switch($this->onWhat)
30: {
31: case self::ON_PLUGIN_LOADED: $listener->onPluginLoaded($this->pluginId); break;
32: case self::ON_PLUGIN_UNLOADED: $listener->onPluginUnloaded($this->pluginId); break;
33: }
34: }
35: }
36: ?>