Exemplo n.º 1
0
 /**
  * @param Client        $client
  * @param NodeInterface $node
  */
 protected function sendNotificationAck(Client $client, NodeInterface $node)
 {
     $ackNode = new Node();
     if ($node->hasAttribute("to")) {
         $ackNode->setAttribute('from', $node->getAttribute("to"));
     }
     if ($node->hasAttribute("participant")) {
         $ackNode->setAttribute('participant', $node->getAttribute("participant"));
     }
     $ackNode->setAttribute('to', $node->getAttribute("from"));
     $ackNode->setAttribute('class', $node->getName());
     $ackNode->setAttribute('id', $node->getAttribute("id"));
     $ackNode->setAttribute('type', $node->getAttribute("type"));
     $client->sendNode($ackNode);
 }