function close($onPurpose = true) { if ($this->server) { if ($onPurpose) { $this->server->notifyUnregister(); foreach ($this->privilegeKeys as $key) { $this->server->privilegeKeyDelete($key); } } $this->server->clientListReset(); $this->server->channelListReset(); $this->server = null; $this->playersGroupId = 0; $this->privilegeKeys = array(); } if ($this->processHandler && $this->processId) { $this->processHandler->killThread($this->processId); $this->processId = null; } Dispatcher::unregister(AppEvent::getClass(), $this); Dispatcher::unregister(TickEvent::getClass(), $this); // TODO something to avoid memory leaks when unloading the plugin // but the TS framework is f*cked up (plenty of circular references // which can't be unset from outside...) }
function stop() { $this->running = false; Dispatcher::unregister(AppEvent::getClass(), $this); Dispatcher::unregister(TickEvent::getClass(), $this); }
function destroy() { Dispatcher::unregister(MonitorEvent::getClass(), $this); $this->barsFrame->destroy(); $this->linesFrame->destroy(); $this->bars = array(); $this->lines = array(); $this->networkStats = array(); $this->networkSums = array(); parent::destroy(); }
/** * (non-PHPdoc) * @see libraries/ManiaLive/Features/Tick/ManiaLive\Features\Tick.Listener::onTick() */ public function onTick() { if (time() >= $this->timeout) { $this->timeout = false; $this->hide(); Dispatcher::unregister(TickEvent::getClass(), $this); } }
function disconnect() { if (!mysql_close($this->connection)) { throw new DisconnectionException(); } $this->connection = null; Dispatcher::unregister(TickEvent::getClass(), $this); }
/** * stop to listen for plugin events. */ protected final function disablePluginEvents($events = PluginEvent::ALL) { $this->restrictIfUnloaded(); Dispatcher::unregister(PluginEvent::getClass(), $this, $events & $this->eventsPlugins); $this->eventsPlugins &= ~$events; }
function destroy() { Dispatcher::unregister(PluginEvent::getClass(), $this); parent::destroy(); }
function destroy() { Dispatcher::unregister(MonitorEvent::getClass(), $this); unset($this->cpuStats); parent::destroy(); }
function destroy() { Dispatcher::unregister(MonitorEvent::getClass(), $this); $this->barsFrame->destroy(); $this->criticalLineFrame->destroy(); $this->optimalLineFrame->destroy(); $this->bars = array(); $this->cpuStats = array(); parent::destroy(); }