public function type($type)
    {
        if ($type !== self::TYPE_SMS && $type !== self::TYPE_VOICE) {
            throw new PhpSmsException('Expected the parameter equals to `Sms::TYPE_SMS` or `Sms::TYPE_VOICE`.');
        }
        $this->smsData['type'] = $type;

        return $this;
    }
public function type($type)
    {
        if ($type !== self::TYPE_SMS && $type !== self::TYPE_VOICE) {
            throw new PhpSmsException('Expected the parameter equals to `Sms::TYPE_SMS` or `Sms::TYPE_VOICE`.');
        }
        $this->smsData['type'] = $type;

        return $this;
    }
public function type ( $ type ) { if ( $ type !== self :: TYPE_SMS && $ type !== self :: TYPE_VOICE ) { throw new PhpSmsException ( 'Expected the parameter equals to `Sms::TYPE_SMS` or `Sms::TYPE_VOICE`.' ) ; } $ this -> smsData [ 'type' ] = $ type ; return $ this ; }
Set the type of Sms instance.

@param $type

@throws PhpSmsException

@return $this
Set the type of Sms instance .