Sets input type

@param string $type

@throws FormException

@return Input
189773
public function setType($type): Input
    {
        $types = [
            'button',
            'checkbox',
            'color',
            'date',
            'datetime',
            'datetime-local',
            'email',
            'file',
            'hidden',
            'image',
            'month',
            'number',
            'password',
            'radio',
            'range',
            'reset',
            'search',
            'submit',
            'tel',
            'text',
            'time',
            'url',
            'week '
        ];

        if (!in_array($type, $types)) {
            Throw new FormException('Your type "' . $type . '" is no valid input control type. Allowed are ' . implode(', ', $types));
        }

        $this->type = $type;
        $this->attribute['type'] = $type;
        $this->data['control'] = $type == 'hidden' ? 'hidden' : 'input';

        return $this;
    }
445110
public function setType($type)
    {
        $this->type = $type;

        switch ($this->type) {
            case 'jdepend-chart':
            case 'jdepend-xml':
            case 'overview-pyramid':
            case 'phpunit-xml':
            case 'summary-xml':
                break;

            default:
                throw new BuildException('Logger "' . $this->type . '" not implemented');
        }
    }
1143460
public function setFormFieldType($formFieldType)
    {
        if (!is_string($formFieldType) || $formFieldType === '') {
            throw new InvalidArgumentException('"Form field type" argument must be a string and must not empty.');
        }

        $this->formFieldType = $formFieldType;

        return $this;
    }
1292549
public function setType( $type )
	{
		if ( $type == $this->getType() ) { return; }

		$this->_checkType( $type );

		$this->_values['type'] = (string) $type;
		$this->setModified();
	}
18504
public function setEncType($type) {

		$type = strtolower($type);

		if($type != 'application/x-www-form-urlencoded' && $type != 'multipart/form-data' && !empty($type)) {
			throw new HtmlFormException("Invalid form enctype: '$type'.", HtmlFormException::INVALID_ENCTYPE);
		}

		$this->encType = $type;

		return $this;

	}
1194184
public function setModeInput($type): Bootstrap3Button
    {
        $this->mode = 'input';
        if (in_array($type, array('button', 'submit', 'reset')) === true) {
            $this->input_type = $type;
        } else {
            $this->input_type = 'button';
        }

        return $this;
    }
486788
public function setType(string $type): ButtonInterface
    {
        if ($this->isVisibility()) {
            $this->type = $type;
        }

        return $this;
    }
637228
public function setMailType($type)
    {
        switch($type){
            case Mail::MAIL_TYPE_HTML:
                $this->mailTypeHeaders = array();
                $this->mailTypeHeaders[] = 'MIME-Version: 1.0';
                $this->mailTypeHeaders[] = 'Content-type: text/html; charset=UTF-8';
                break;
            case Mail::MAIL_TYPE_PLAIN:
                $this->mailTypeHeaders = array();
                break;
        }
    }
466441
public function type($type)
    {
        $type = strtoupper($type);

        if (!in_array($type, ['INSERT', 'INSERT IGNORE', 'REPLACE'])) {
            throw new \UnexpectedValueException('Invalid insert type');
        }

        $this->type = $type;

        return $this;
    }
410920
public function setType($type)
    {
        $this->type = $type;
        switch ($this->type) {
            case 'xml':
                $this->className = 'XMLRenderer';
                break;

            case 'html':
                $this->className = 'HTMLRenderer';
                break;

            case 'text':
                $this->className = 'TextRenderer';
                break;

            default:
                throw new BuildException('Formatter "' . $this->type . '" not implemented');
        }
    }
811607
public function setSize($size): Input
    {
        if (empty((int) $size)) {
            Throw new FormException('A html form inputs size needs to be an integer.');
        }

        $this->attribute['size'] = $size;

        return $this;
    }
152656
public function setFormat($type, $format)
    {
        if ($this->typeIsAvailable($type)) {
            $this->formats[$type] = $format;
        }

        return $this;
    }
779471
public function setObjectType($type)
    {
        if (!is_null($type)) {
            $type = (string) $type;
        }

        $this->objectType = $type;
        return $this;
    }
585140
public function setType($type)
    {
        if (! in_array($type, self::$types, true)) {
            throw new InvalidArgumentException(sprintf(
                '"%s" is not a valid type! Valid types: %s',
                $type,
                implode(', ', self::$types)
            ));
        }

        $this->type = $type;

        return $this;
    }
352597
public function setType($type)
    {
        $returnValue = (bool) false;

        
		$this->type = $type;
		$returnValue = true;
        

        return (bool) $returnValue;
    }
552171
public function setType($type)
    {
        switch($type)
        {
            case self::YOUTUBE:
                return new Services\Youtube();
                break;

            case self::VIMEO:
                return new Services\Vimeo();
                break;

            default:
                throw new \InvalidArgumentException("$type is not a valid video site");
        }
    }
548224
public function setType($type)
    {
        if (is_string($type)) {
            $type = ColumnType::createType($type);
        } elseif (!$type instanceof AbstractType) {
            throw new Exception\InvalidArgumentException(__METHOD__ . ' setType() accepts only AbstractType or string.');
        }
        $this->properties['type'] = $type;

        return $this;
    }