Example #1
0
File: Muc.php Project: Hywan/moxl
 static function setConfig($to, $data)
 {
     $dom = new \DOMDocument('1.0', 'UTF-8');
     $query = $dom->createElementNS('http://jabber.org/protocol/muc#owner', 'query');
     $dom->appendChild($query);
     $x = $dom->createElementNS('jabber:x:data', 'x');
     $x->setAttribute('type', 'submit');
     $query->appendChild($x);
     $xmpp = new \FormtoXMPP($data);
     $xmpp->create();
     $xmpp->appendToX($dom);
     $xml = \Moxl\API::iqWrapper($query, $to, 'set');
     \Moxl\API::request($xml);
 }
Example #2
0
File: AdHoc.php Project: Hywan/moxl
 static function submit($to, $node, $data, $sessionid)
 {
     $dom = new \DOMDocument('1.0', 'UTF-8');
     $command = $dom->createElementNS('http://jabber.org/protocol/commands', 'command');
     $dom->appendChild($command);
     $command->setAttribute('sessionid', $sessionid);
     $command->setAttribute('node', $node);
     $x = $dom->createElementNS('jabber:x:data', 'x');
     $x->setAttribute('type', 'submit');
     $command->appendChild($x);
     $xmpp = new \FormtoXMPP($data);
     $xmpp->create();
     $xmpp->appendToX($dom);
     $xml = \Moxl\API::iqWrapper($command, $to, 'set');
     \Moxl\API::request($xml);
 }
Example #3
0
 static function setConfig($to, $node, $data)
 {
     $dom = new \DOMDocument('1.0', 'UTF-8');
     $pubsub = $dom->createElementNS('http://jabber.org/protocol/pubsub#owner', 'pubsub');
     $dom->appendChild($pubsub);
     $configure = $dom->createElement('configure');
     $configure->setAttribute('node', $node);
     $pubsub->appendChild($configure);
     $x = $dom->createElementNS('jabber:x:data', 'x');
     $x->setAttribute('type', 'submit');
     $configure->appendChild($x);
     $xmpp = new \FormtoXMPP($data);
     $xmpp->create();
     $xmpp->appendToX($dom);
     $xml = \Moxl\API::iqWrapper($pubsub, $to, 'set');
     \Moxl\API::request($xml);
 }