]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/immanager.php
Opps, PEAR sucks. Need to call find() before fetch() ... :-(
[quix0rs-gnu-social.git] / lib / immanager.php
index 4c28ec0e6abea8cbbb66413614d497c22aca9660..9563a53262d786cb2dc1ff3b56d59db5feb643ea 100644 (file)
@@ -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;
-    }
 }