protected static function createRequestParameters($sessionId, $sourceAddres, $destinationAddress, $data, $sendDate = null, $validity = 0)
    {
        $parameters = array(
            'sessionId' => $sessionId,
            'sourceAddress' => $sourceAddres,
            'data' => $data
        );

        if (gettype($destinationAddress) == "string") {

            $parameters['destinationAddress'] = $destinationAddress;

        } elseif (gettype($destinationAddress) == "array") {
            $parameters['destinationAddresses'] = $destinationAddress;
        }

        if (gettype($sendDate) == "string") {
            $parameters['sendDate'] = $sendDate;
        } elseif (gettype($sendDate) == "integer") {
            $parameters['sendDate'] = date("Y-m-d", $sendDate).'T'.date("H:i:s", $sendDate);
        }

        if ((gettype($validity) == "integer") && ($validity != 0)) {
            $parameters['validity'] = $validity;
        }

        return $parameters;
    }
protected static function createRequestParameters($sessionId, $sourceAddres, $destinationAddress, $data, $sendDate = null, $validity = 0)
    {
        $parameters = array(
            'sessionId' => $sessionId,
            'sourceAddress' => $sourceAddres,
            'data' => $data
        );

        if (gettype($destinationAddress) == "string") {

            $parameters['destinationAddress'] = $destinationAddress;

        } elseif (gettype($destinationAddress) == "array") {
            $parameters['destinationAddresses'] = $destinationAddress;
        }

        if (gettype($sendDate) == "string") {
            $parameters['sendDate'] = $sendDate;
        } elseif (gettype($sendDate) == "integer") {
            $parameters['sendDate'] = date("Y-m-d", $sendDate).'T'.date("H:i:s", $sendDate);
        }

        if ((gettype($validity) == "integer") && ($validity != 0)) {
            $parameters['validity'] = $validity;
        }

        return $parameters;
    }
protected static function createRequestParameters ( $ sessionId , $ sourceAddres , $ destinationAddress , $ data , $ sendDate = null , $ validity = 0 ) { $ parameters = array ( 'sessionId' => $ sessionId , 'sourceAddress' => $ sourceAddres , 'data' => $ data ) ; if ( gettype ( $ destinationAddress ) == "string" ) { $ parameters [ 'destinationAddress' ] = $ destinationAddress ; } elseif ( gettype ( $ destinationAddress ) == "array" ) { $ parameters [ 'destinationAddresses' ] = $ destinationAddress ; } if ( gettype ( $ sendDate ) == "string" ) { $ parameters [ 'sendDate' ] = $ sendDate ; } elseif ( gettype ( $ sendDate ) == "integer" ) { $ parameters [ 'sendDate' ] = date ( "Y-m-d" , $ sendDate ) . 'T' . date ( "H:i:s" , $ sendDate ) ; } if ( ( gettype ( $ validity ) == "integer" ) && ( $ validity != 0 ) ) { $ parameters [ 'validity' ] = $ validity ; } return $ parameters ; }
SMS send request parameters preparation

@access public
@static

@param string  $sessionId          Session ID. @see getsessionId_St
@param string  $sourceAddres       sender name(up to 11 chars) or phone number(up to 15 digits)
@param string  $destinationAddress destination phone. Country code+cellular code+phone number, E.g. 79031234567
@param string  $data               message
@param mixed   $sendDate           Delayed message send date and time. String format YYYY-MM-DDTHH:MM:SS or integer Timestamp.
@param integer $validity           Message life time in minutes.

@return array     POST request parameters
@throws Exception
SMS send request parameters preparation