src/whatsprot.class.php
public function sendGetNormalizedJid($countryCode, $number)
    {
        $msgId = $this->createIqId();
        $ccNode = new ProtocolNode('cc', null, null, $countryCode);
        $inNode = new ProtocolNode('in', null, null, $number);
        $normalizeNode = new ProtocolNode('normalize', null, [$ccNode, $inNode], null);
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'xmlns' => 'urn:xmpp:whatsapp:account',
                'type'  => 'get',
                'to'    => Constants::WHATSAPP_SERVER,
            ], [$normalizeNode], null);

        $this->sendNode($node);
    }
public function sendGetNormalizedJid($countryCode, $number)
    {
        $msgId = $this->createIqId();
        $ccNode = new ProtocolNode('cc', null, null, $countryCode);
        $inNode = new ProtocolNode('in', null, null, $number);
        $normalizeNode = new ProtocolNode('normalize', null, [$ccNode, $inNode], null);
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'xmlns' => 'urn:xmpp:whatsapp:account',
                'type'  => 'get',
                'to'    => Constants::WHATSAPP_SERVER,
            ], [$normalizeNode], null);

        $this->sendNode($node);
    }
public function sendGetNormalizedJid ( $ countryCode , $ number ) { $ msgId = $ this -> createIqId ( ) ; $ ccNode = new ProtocolNode ( 'cc' , null , null , $ countryCode ) ; $ inNode = new ProtocolNode ( 'in' , null , null , $ number ) ; $ normalizeNode = new ProtocolNode ( 'normalize' , null , [ $ ccNode , $ inNode ] , null ) ; $ node = new ProtocolNode ( 'iq' , [ 'id' => $ msgId , 'xmlns' => 'urn:xmpp:whatsapp:account' , 'type' => 'get' , 'to' => Constants :: WHATSAPP_SERVER , ] , [ $ normalizeNode ] , null ) ; $ this -> sendNode ( $ node ) ; }
Send a request to get the normalized mobile number representing the JID.

@param string $countryCode Country Code
@param string $number      Mobile Number
Send a request to get the normalized mobile number representing the JID .