PHPDaemon\Clients\XMPP\Connection::iqSetTo PHP Method

iqSetTo() public method

public iqSetTo ( string $to, string $xml, callable $cb ) : boolean
$to string
$xml string
$cb callable
return boolean
    public function iqSetTo($to, $xml, $cb)
    {
        if (!isset($this->xml)) {
            return false;
        }
        $id = $this->getId();
        $this->xml->addIdHandler($id, $cb);
        $this->sendXML('<iq xmlns="jabber:client" type="set" id="' . $id . '" to="' . htmlspecialchars($to) . '">' . $xml . '</iq>');
        return true;
    }