/**
  * Take a previously-queued XMPP stanza and send it out ot the server.
  * @param string $msg
  * @return boolean true on success
  */
 function handle($msg)
 {
     assert(is_string($msg));
     $xmpp = XmppManager::get();
     $ok = $xmpp->send($msg);
     return $ok;
 }
Example #2
0
 /**
  * Initialize IoManagers for the currently configured site
  * which are appropriate to this instance.
  */
 function initManagers()
 {
     if (common_config('xmpp', 'enabled')) {
         $qm = QueueManager::get();
         $qm->setActiveGroup('xmpp');
         $this->instantiate($qm);
         $this->instantiate(XmppManager::get());
         $this->instantiate($this->processManager);
     }
 }