Set type.

@param Type $type

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

        return $this;
    }
261736
public function setType(?string $type): self
    {
        $this->type                          = $this->validateType($type);
        $this->type_hint || $this->type_hint = $this->type;

        return $this;
    }
224229
public function setType($type)
    {
        if (!in_array($type, array(
            self::TYPE_CORE,
            self::TYPE_DISTRIBUTION,
            self::TYPE_CAMPAIGN,
            self::TYPE_MILESTONE,
            self::TYPE_ACTIVITY,
            self::TYPE_OPERATION,
            self::TYPE_CHANNEL,
            self::TYPE_LOCATION,
            self::TYPE_SECURITY,
            self::TYPE_REPORT,
            self::TYPE_REPORT_ANALYTICS,
            self::TYPE_REPORT_BUDGET,
            self::TYPE_REPORT_SALES,
            self::TYPE_HOOK,
            self::TYPE_SYMFONY,
        ))) {
            throw new \InvalidArgumentException("Invalid bundle type.");
        }
        $this->type = $type;

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

		$this->_checkType( $type );

		$this->_values['type'] = (string) $type;
		$this->setModified();
	}
1075408
public function setMimetype($type)
    {
        if ($type === null || $type === false) {
            $this->mimetype = null;

            return $this;
        }

        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Mimetype must be a string'
            );
        }

        $this->mimetype = $type;

        return $this;
    }
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");
        }
    }
62693
public function setType(string $type): AssetInterface
    {
        $path = $this->file->isExternal() ? $this->getUrl() : $this->getPath();

        $this->file->setType($path, $type);

        return $this;
    }
614152
public function setType($type) {

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

    }
244265
public function setType($type)
    {
        if ($this->formHelper->getFieldType($type)) {
            $this->type = $type;
        }

        return $this;
    }
1194794
public function setType($type)
    {
        if (!isset($this->types[$type])) {
            throw new InvalidArgumentException('type must be one of:' . implode(', ', array_keys($this->types)));
        }

        $this->type = $type;

        return $this;
    }
435439
public function type($type = null)
    {
        if (is_null($type)) {
            unset($this->filters['post_type']);
        } else {
            $this->filters['post_type'] = $type;
        }
        return $this;
    }
279143
public function setPostType($type)
    {
        if (!in_array($type, [0, 1, 2, 3, 4, 5])) {
            $this->postType = self::POST_FORM_DATA;
        } else {
            $this->postType = $type;
        }
        return $this;
    }
1020910
public function setType(Type $type = null)
    {
        if ($this->type !== $type) {
            $this->type = $type;
        }

        return $this;
    }
1095423
public function setType( $type )
    {
        $this->type = is_int( $type ) ? $type : self::getStorableType( $type );
        return $this;
    }
828235
public function setType($type)
    {
        if (is_string($type)) {
            if (in_array($type, [
                self::TYPE_ALL, self::TYPE_PRINT, self::TYPE_SCREEN, self::TYPE_SPEECH,
                self::TYPE_AURAL, self::TYPE_BRAILLE, self::TYPE_EMBOSSED, self::TYPE_HANDHELD,
                self::TYPE_PROJECTION, self::TYPE_TTY, self::TYPE_TV
            ])) {
                $this->type = $type;

                return $this;
            } else {
                // Invalid type values have to be handled as "not all"
                // @see: http://dev.w3.org/csswg/mediaqueries-4/#error-handling
                $this->type = self::TYPE_ALL;
                $this->setIsNot(true);
                $this->setIsOnly(false);
            }
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($type). "' for argument 'type' given."
            );
        }
    }
1057626
public function setInputType($type)
    {
        if (empty($type)) {
            $this->inputType = null;
            return $this;
        }

        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Property input type must be a string'
            );
        }

        $this->inputType = $type;

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

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

        return $this->addMeta('card', $type);
    }