@param string $type

@return FTry
341438
protected function setType($type)
    {
        return Match::on($type)
            ->string(function ($type) {
                $this->type = $type;
                return FTry::with($type);
            })
            ->any(function () {
                return FTry::with(function () {
                    return new \RuntimeException('Type must be specified by string');
                });
            })
            ->value();
    }
187888
public static function factory($type)
    {
        if ($type instanceof TypeInterface) return $type;

        if (strpos($type, "\\") === false) {
            $type = ucfirst(trim(strval($type)));
            if (strripos(strrev($type), strrev('type')) === false) $type .= 'Type';

            $type = "DataEntity\\Type\\" . $type;
        }

        if (
            !class_exists($type)
            || !in_array("DataEntity\\TypeInterface", class_implements($type))
        ) throw new \InvalidArgumentException('Type ' . $type . ' is invalid.');

        return new $type;
    }
1321784
public function getType($type)
    {
        if (!$this->hasType($type)) {
            $this->metaTypeList[$type] = new $type();
        }

        return $this->metaTypeList[$type];
    }
375131
public static function instantiateSubclassForType($type)
    {
        if ('rdf' === $type) {
            $instance = GeneralUtility::makeInstance(RDFRenderer::class);
        } else {
            if ('json-ld' === $type) {
                $instance = GeneralUtility::makeInstance(JSONLDRenderer::class);
            } else {
                $instance = GeneralUtility::makeInstance(TurtleRenderer::class);
            }
        }

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

        return $this;
    }
1095423
public function setType( $type )
    {
        $this->type = is_int( $type ) ? $type : self::getStorableType( $type );
        return $this;
    }
614152
public function setType($type) {

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

    }
940029
protected function getResultsByType($type)
    {
        $mapper = $this->relatedMapper->getManager()->mapper($type);

        $key = $mapper->getEntityMap()->getKeyName();

        $query = $mapper->getQuery();

        return $query->whereIn($key, array_keys($this->dictionary[$type]))->get();
    }
728146
public function get($type)
    {
        if (isset($this->definitions[$type])) {
            return $this->definitions[$type];
        }

        throw new UnregisteredDefinitionException(
            $type,
            UnregisteredDefinitionException::TARGET_MIME_TYPE
        );
    }
1046991
public function register(Type $type): self
    {
        $this->types[$type->name] = $type;

        return $this;
    }
1257531
private static function getTyped($type)
    {
        if (!isset(static::$types[$type])) {
            static::$types[$type] = new self($type);
        }

        return static::$types[$type];
    }
413949
protected function getType($type)
    {
        if (isset($this->typeAlias[$type])) {
            return $this->typeAlias[$type];
        }

        return $type;
    }
1216735
public function type($type)
    {
        $types = is_array($type) ? $type : func_get_args();

        $this->types = array_merge($this->types, $types);

        return $this;
    }
1055894
public function make($type)
    {
        if ($instance = array_get($this->resolved, $type)) {
            return $instance;
        }

        return $this->build($type);
    }
1308896
public function getFlashText($type)
    {
        if ($this->{$type}) {
            return $this->{$type};
        } elseif ($this->parent) {
            return $this->parent->getFlashText($type);
        }

        return $type;
    }
1046599
public function getHasher($type)
    {
        if (!isset($this->hashers[$type])) {
            throw new \RuntimeException('Hasher not configured: ' . $type);
        }
        return $this->hashers[$type];
    }
503849
public static function factory($type)
    {
        if (isset(self::$transports[$type])) {
            return self::$transports[$type];
        }

        self::$transports[$type] = new Transport($type);
        return self::$transports[$type];
    }