src/whatsprot.class.php
protected function sendGroupsChangeParticipants($groupId, $participant, $tag, $id)
    {
        $participants = new ProtocolNode('participant', ['jid' => $this->getJID($participant)], null, '');

        $childHash = [];
        $child = new ProtocolNode($tag, $childHash, [$participants], '');

        $node = new ProtocolNode('iq',
            [
                'id'    => $id,
                'type'  => 'set',
                'xmlns' => 'w:g2',
                'to'    => $this->getJID($groupId),
            ], [$child], '');

        $this->sendNode($node);
    }
protected function sendGroupsChangeParticipants($groupId, $participant, $tag, $id)
    {
        $participants = new ProtocolNode('participant', ['jid' => $this->getJID($participant)], null, '');

        $childHash = [];
        $child = new ProtocolNode($tag, $childHash, [$participants], '');

        $node = new ProtocolNode('iq',
            [
                'id'    => $id,
                'type'  => 'set',
                'xmlns' => 'w:g2',
                'to'    => $this->getJID($groupId),
            ], [$child], '');

        $this->sendNode($node);
    }
protected function sendGroupsChangeParticipants ( $ groupId , $ participant , $ tag , $ id ) { $ participants = new ProtocolNode ( 'participant' , [ 'jid' => $ this -> getJID ( $ participant ) ] , null , '' ) ; $ childHash = [ ] ; $ child = new ProtocolNode ( $ tag , $ childHash , [ $ participants ] , '' ) ; $ node = new ProtocolNode ( 'iq' , [ 'id' => $ id , 'type' => 'set' , 'xmlns' => 'w:g2' , 'to' => $ this -> getJID ( $ groupId ) , ] , [ $ child ] , '' ) ; $ this -> sendNode ( $ node ) ; }
Change participants of a group.

@param string $groupId     The group ID.
@param string $participant The participant.
@param string $tag         The tag action. 'add', 'remove', 'promote' or 'demote'
@param        $id
Change participants of a group .