src/whatsprot.class.php
public function sendDeleteBroadcastLists($lists)
    {
        $msgId = $this->createIqId();
        $listNode = [];
        if ($lists != null && count($lists) > 0) {
            for ($i = 0; $i < count($lists); $i++) {
                $listNode[$i] = new ProtocolNode('list', ['id' => $lists[$i]], null, null);
            }
        } else {
            $listNode = null;
        }
        $deleteNode = new ProtocolNode('delete', null, $listNode, null);
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'xmlns' => 'w:b',
                'type'  => 'set',
                'to'    => Constants::WHATSAPP_SERVER,
            ], [$deleteNode], null);

        $this->sendNode($node);
    }
public function sendDeleteBroadcastLists($lists)
    {
        $msgId = $this->createIqId();
        $listNode = [];
        if ($lists != null && count($lists) > 0) {
            for ($i = 0; $i < count($lists); $i++) {
                $listNode[$i] = new ProtocolNode('list', ['id' => $lists[$i]], null, null);
            }
        } else {
            $listNode = null;
        }
        $deleteNode = new ProtocolNode('delete', null, $listNode, null);
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'xmlns' => 'w:b',
                'type'  => 'set',
                'to'    => Constants::WHATSAPP_SERVER,
            ], [$deleteNode], null);

        $this->sendNode($node);
    }
public function sendDeleteBroadcastLists ( $ lists ) { $ msgId = $ this -> createIqId ( ) ; $ listNode = [ ] ; if ( $ lists != null && count ( $ lists ) > 0 ) { for ( $ i = 0 ; $ i < count ( $ lists ) ; $ i ++ ) { $ listNode [ $ i ] = new ProtocolNode ( 'list' , [ 'id' => $ lists [ $ i ] ] , null , null ) ; } } else { $ listNode = null ; } $ deleteNode = new ProtocolNode ( 'delete' , null , $ listNode , null ) ; $ node = new ProtocolNode ( 'iq' , [ 'id' => $ msgId , 'xmlns' => 'w:b' , 'type' => 'set' , 'to' => Constants :: WHATSAPP_SERVER , ] , [ $ deleteNode ] , null ) ; $ this -> sendNode ( $ node ) ; }
Delete Broadcast lists.

@param string array $lists
Contains the broadcast-id list
Delete Broadcast lists .