Set the type of Sms instance.

@param $type

@throws PhpSmsException

@return $this
353457
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;
    }
205315
public function setMessage($type, $content)
    {
        $message = new \stdClass;
        $message->mt = $type;
        $message->content = $content;
        $messages = $this->session()->get('messages', array());
        $messages[] = $message;
        $this->session()->set('messages', $messages);
    }
318355
public function clear($type = null)
    {
        if (!$type) {
            $this->messages = [];
        } elseif (isset($this->messages[$type])) {
            unset($this->messages[$type]);
        }

        $this->writeToSession();
        return $this;
    }
835145
public function setType($type)
    {
        foreach ($this->results as $name) {
            $this->columns->offsetGet($name)->setType($type);
        }

        return $this;
    }
658126
protected function setType($type)
    {
        if ($type == '*/*' || $type == 'application/octet-stream')
        {
            $type = \Module\HttpFoundation\getMimeTypeOfFile($this->getTmpName(), false);
            if ( empty($type) )
                if ( null !== $solved = \Module\HttpFoundation\getMimeTypeOfFile($this->getClientFilename()) )
                    $type = $solved;
                else
                    $type = 'application/octet-stream';
        }

        $this->type = (string) $type;
        return $this;
    }
17345
public function setType($type = self::TYPE_TEXT) {
		if (!in_array($type, array(self::TYPE_TEXT, self::TYPE_HTML))) {
			throw new MailException('invalid type: ' . $type);
		}
		$this->type = $type;
	}
1308679
public function setType($type) {

        $this->checkInArray($type, GDAXConstants::$marginTransferTypeValues);
        $this->type = $type;
        return $this;

    }
495156
public function set($sType, $sMessage)
    {
        $sType    = strtoupper(trim($sType));
        $sMessage = trim($sMessage);

        $this->aMessages[$sType] = $sMessage;

        return $this;
    }
579088
public function setType($type)
    {
        if ($type === null) {
            $this->$type = $type;
        } else {
            $iconSetType = new IconSetTypeEnum($type);
            $this->type = $iconSetType->getValue();
        }

        return $this;
    }
1267118
public function setType($type) {
        $types = [static::TYPE_DEFINED_ONLY, static::TYPE_ARBITRARY];
        if (in_array($type, $types)) {
            $this->type = $type;
        }
        return $this;
    }
611998
public function set($type, $message)
    {
        $type = StaticFilter::filter('number', $type);
        if ($type < 0 || $type > 3) {
            $type = static::TYPE_INFO;
        }
        self::$messages[$type][] = $message;
        $this->getSessionDriver()
            ->set('_messages_', self::$messages)
        ;
        return $this;
    }
926360
public function setType($type)
    {
        $this->type = $type;

        switch ($type) {
            case 'text':
            case 'string':
                $this->operatorOpts = ['equals', 'notequals', 'contains'];
                break;
            case 'integer':
                $this->operatorOpts = ['equals', 'notequals', 'greaterthan', 'lessthan'];
                break;
            case 'boolean':
                $this->operatorOpts = ['equals'];
                break;
        }

        return $this;
    }
659503
public function setType($type)
    {
        if (empty($type)) return $this;

        $this->checkType($type);
        $this->type = $type;

        return $this->addMeta('card', $type);
    }
423138
public function setType($type)
    {
        if (!in_array($type, [Constants::GROUP_TYPE_AV_CHAT_ROOM, Constants::GROUP_TYPE_B_CHAT_ROOM, Constants::GROUP_TYPE_CHAT_ROOM, Constants::GROUP_TYPE_PRIVATE, Constants::GROUP_TYPE_PUBLIC])) {
            throw new InvalidArgumentException('Group type is incorrect.');
        }
        $this->setParameter('Type', $type);
        return $this;
    }
1140810
public function setType($type)
    {
        if (is_string($type) && in_array($type, self::$types)) {
            $this->type = $type;
        } else {
            throw new InvalidArgumentException;
        }
    }
1081968
public function set($type, $messages)
    {
        foreach((array) $messages as $message) {
            parent::set($type, $message);
        }

        return $this;
    }
325613
public function setType(Type $type)
    {
        if ($this->type !== $type) {
            $this->type = $type;
            $type->setItem($this);
        }

        return $this;
    }