@param string $type

@return string
169656
public function getEntityName($type)
    {
        $event = new NodeResolveEntityNameEvent($type);
        $this->dispatcher
            ->dispatch(NodeEvents::RESOLVE_ENTITY_NAME, $event);

        return $event->getEntityName();
    }
1108560
private function getTypeTranslation($type)
    {
        if (!array_key_exists($type, $this->typeConfiguration)) {
            return ucfirst($type);
        }

        $typeTranslationKey = $this->typeConfiguration[$type]['translation_key'];

        return $this->translator->trans($typeTranslationKey, [], 'backend');
    }
355795
protected function getPhpType(Type $type): string
    {
        switch ($builtinType = $type->getBuiltinType()) {
            case Type::BUILTIN_TYPE_ARRAY:
            case Type::BUILTIN_TYPE_INT:
            case Type::BUILTIN_TYPE_FLOAT:
            case Type::BUILTIN_TYPE_BOOL:
            case Type::BUILTIN_TYPE_STRING:
                return $builtinType;
            case Type::BUILTIN_TYPE_OBJECT:
                if (null !== ($className = $type->getClassName()) && is_a($className, \DateTimeInterface::class, true)) {
                    return \DateTimeInterface::class;
                }

            // no break
            default:
                return 'string';
        }
    }
1225150
protected function typeToString($type)
    {

        if (is_object($type)) {
            return sprintf('Object::%s', get_class($type));
        }

        if (is_array($type)) {
            $types = [];

            /** @noinspection ForeachSourceInspection */
            foreach ($type as $key => $item) {
                $types[] = sprintf('%s => %s', $key, $this->typeToString($item));
            }

            return 'Array(' . implode(', ', $types) . ')';
        }

        if (is_bool($type)) {
            return sprintf('Boolean::%s', $type ? 'True' : 'False');
        }

        if (is_int($type) || is_float($type)) {
            return sprintf('Integer::%s', (string) $type);
        }

        if ($type === null) {
            return 'null';
        }

        return "'$type'";
    }
924146
private static function getDecoder($type)
    {
        if ($type === true) {
            return function ($value) {
                return rawurldecode(str_replace('+', ' ', $value));
            };
        } elseif ($type == Query::RFC3986) {
            return 'rawurldecode';
        } elseif ($type == Query::RFC1738) {
            return 'urldecode';
        } else {
            return function ($str) { return $str; };
        }
    }
293768
protected function getDoctrineColumnType($type)
	{
		$type = strtolower($type);

		switch ($type) {
			case 'biginteger':
				$type = 'bigint';
				break;
			case 'smallinteger':
				$type = 'smallint';
				break;
			case 'mediumtext':
			case 'longtext':
				$type = 'text';
				break;
		}

		return Type::getType($type);
	}
1073689
public function type($type = null)
    {
        if (is_null($type)) {
            return $this->type;
        }

        $this->type = $type;

        return $this;
    }
653747
static public function getStorableType( $type )
    {
        switch ( $type )
        {
            case 'google':      return self::TYPE_GOOGLE;
            case 'facebook':    return self::TYPE_FACEBOOK;
            case 'yahoo':       return self::TYPE_YAHOO;
            case 'twitter':     return self::TYPE_TWITTER;
        }
    }
527793
protected function _getIdGeneratorTypeString($type)
    {
        switch ($type) {
            case ClassMetadataInfo::GENERATOR_TYPE_AUTO:
                return 'AUTO';

            case ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE:
                return 'SEQUENCE';

            case ClassMetadataInfo::GENERATOR_TYPE_TABLE:
                return 'TABLE';

            case ClassMetadataInfo::GENERATOR_TYPE_IDENTITY:
                return 'IDENTITY';

            case ClassMetadataInfo::GENERATOR_TYPE_UUID:
                return 'UUID';

            case ClassMetadataInfo::GENERATOR_TYPE_CUSTOM:
                return 'CUSTOM';
        }
    }
823734
public function getFiles($type)
	{
		$f = $type . 'Files';

		if (property_exists($this, $f))
		{
			return self::${$f};
		}

		$this->say('Missing Files: ' . $type);

		return "";
	}
711835
protected function getTypeForString($type)
    {
        switch ($type) {
            case 'string':
                return DataTypes::STRING_TYPE;
            case 'number':
                return DataTypes::NUMBER_TYPE;
            case 'date':
            case 'datetime':
                return DataTypes::DATETIME_TYPE;
            case 'boolean':
                return DataTypes::BOOLEAN_TYPE;
            case 'tags':
                return DataTypes::TAGS_TYPE;
            case 'auto-complete':
                return DataTypes::AUTO_COMPLETE_TYPE;
            default:
                return DataTypes::UNDEFINED_TYPE;
        }
    }
1206461
protected function getCharacter($type)
    {
        $character = $this->charSet[$type][rand(0, strlen($this->charSet[$type]) - 1)];

        if ($this->unique) {
            $this->removeFromArray($character);
        }

        return $character;
    }
767435
public static function getGenericTypeText($type)
    {
        switch ($type) {
            case static::T_IMAGE:
                return t('Image');
                break;
            case static::T_VIDEO:
                return t('Video');
                break;
            case static::T_TEXT:
                return t('Text');
                break;
            case static::T_AUDIO:
                return t('Audio');
                break;
            case static::T_DOCUMENT:
                return t('Document');
                break;
            case static::T_APPLICATION:
                return t('Application');
                break;
            case static::T_UNKNOWN:
                return t('File');
                break;

        }
    }
84421
private function getLongTypeFromType(string $type): string
    {
        $reflection = new \ReflectionObject($this);
        foreach ($reflection->getConstants() as $const => $value) {
            if (0 === strpos($const, 'TYPE_')) {
                if ($type === $value) {
                    return strtolower(substr($const, 5));
                }
            }
        }

        return 'info';
    }
1080224
protected static function cleanType($type)
    {
        $type = str_replace([
            "\r",
            "\n",
            "\t",
            '{',
            '}',
            '[',
            ']',
            ';',
        ], '', $type);
        $type = preg_replace('/[\s]+/', ' ', $type);
        return trim($type);
    }
880387
public static function input(string $type)
    {
        $self = self::$input[$type] ?? new self;

        self::$input[$type] = $self;

        switch (strtoupper($type)) {
            case 'GET':
            case 'POST':
                $self->params = filter_input_array(constant('INPUT_' . $type)) ?? [];
                break;
            case 'PUT':
            case 'DELETE':
                $self->params = self::getParsedInput();
                break;
        }

        return function ($key = null) use ($self) {
            $self->key = $key;

            return $self;
        };
    }
76232
protected function getTypeByCode($type)
    {
        switch ($type) {
            case self::BOOLEAN:
                return 'boolean';
            case self::INT:
                return 'int';
            case self::FLOAT:
                return 'float';
            case self::STRING:
                return 'string';
            case self::DATE:
                return 'date';
            case self::OBJECT:
                return 'object';
            case self::XML:
                return 'xml';
            case self::DATA:
                return 'data';
            case self::DATA_ARRAY:
                return 'array';

            default:
                return null;
        }
    }