Ejemplo n.º 1
0
 /**
  * @return Node
  */
 public function createNode()
 {
     $child = new Node();
     $child->setName('query');
     $node = new Node();
     $node->setName('iq');
     $node->setAttributes(["id" => 'getgroupinfo-', "type" => "get", "xmlns" => "w:g", "to" => Identity::createJID($this->getGroupId())]);
     $node->addChild($child);
     return $node;
 }
Ejemplo n.º 2
0
 /**
  * @return Node
  */
 public function createNode()
 {
     $listNode = new Node();
     $listNode->setName('list');
     $listNode->setAttribute('type', $this->getType());
     $node = new Node();
     $node->setName('iq');
     $node->setAttributes(["id" => 'getgroups-', "type" => "get", "xmlns" => "w:g", "to" => "g.us"]);
     $node->addChild($listNode);
     return $node;
 }
Ejemplo n.º 3
0
 /**
  * @return Node
  */
 public function createNode()
 {
     $syncNode = new Node();
     $syncNode->setName('sync');
     $syncNode->setAttributes(["mode" => $this->getMode(), "context" => $this->getContext(), "sid" => "" . (time() + 11644477200) * 10000000, "index" => "" . $this->getIndex(), "last" => $this->isLast() ? "true" : "false"]);
     foreach ($this->getNumbers() as $number) {
         $userNode = new Node();
         $userNode->setName('user')->setData($number);
         $syncNode->addChild($userNode);
     }
     $node = new Node();
     $node->setName('iq');
     $node->setAttributes(["id" => 'sendsync-', "type" => "get", "xmlns" => "urn:xmpp:whatsapp:sync", "to" => Identity::createJID($this->getTo())]);
     $node->addChild($syncNode);
     return $node;
 }