X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fimmanager.php;h=9563a53262d786cb2dc1ff3b56d59db5feb643ea;hb=refs%2Fheads%2Fupstream-changes%2Fgoogle-analytics-removal;hp=4c28ec0e6abea8cbbb66413614d497c22aca9660;hpb=32084e33a266797b306158df29e48f057651b410;p=quix0rs-gnu-social.git diff --git a/lib/immanager.php b/lib/immanager.php index 4c28ec0e6a..9563a53262 100644 --- a/lib/immanager.php +++ b/lib/immanager.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } * 2) override handleInput() with what to do when data is waiting on * one of the sockets * 3) override idle($timeout) to do keepalives (if necessary) - * 4) implement send_raw_message() to send raw data that ImPlugin::enqueue_outgoing_raw + * 4) implement send_raw_message() to send raw data that ImPlugin::enqueueOutgoingRaw * enqueued */ @@ -42,8 +42,7 @@ abstract class ImManager extends IoManager function __construct($imPlugin) { $this->plugin = $imPlugin; - //TODO We only really want to register this event if this is the thread that runs the ImManager - Event::addHandler('EndInitializeQueueManager', array($this, 'onEndInitializeQueueManager')); + $this->plugin->imManager = $this; } /** @@ -54,17 +53,4 @@ abstract class ImManager extends IoManager { throw new Exception('ImManager should be created using it\'s constructor, not the static get method'); } - - /** - * Register notice queue handler - * - * @param QueueManager $manager - * - * @return boolean hook return - */ - function onEndInitializeQueueManager($manager) - { - $manager->connect($this->plugin->transport . '-out', new ImSenderQueueHandler($this->plugin, $this), 'imdaemon'); - return true; - } }