/*  public static function convertTypeName($typeName) {
return __NAMESPACE__.'\\'.$typeName;
}

public static function convertClassName($classFQN) {
return Code::getClassName($classFQN);
}
519820
public function getContextLabel($context = 'default') {
    if ($context === self::CONTEXT_DEFAULT) {
      return parent::getContextLabel($context);
    }
    
    return parent::getContextLabel($context);
  }
856774
private function resolveTypeName($className)
    {
        if (strpos($className, ':') !== false || strpos($className, '\\') !== false) {
            return $this->getMetadataCollector()->getDocumentType($className);
        }

        return $className;
    }
745789
public function getTypeMapping($indexName, $typeName)
    {
        $index = $this->getIndex($indexName);
        $type = $index->getType($typeName);

        return $type->getMapping();
    }
1313124
public static function getOnlyNameSpace($className)
    {
        // Try to find namespace separator
        if (($p = strrpos($className, self::NS_SEPARATOR)) !== false) {
            $className = substr($className, 0, $p);
        }

        return $className;
    }
592028
public function getModelNameAsFQCN($referenceNamespace = null)
    {
        $namespace = $this->getEntityNamespace();
        $fqcn = ($namespace == $referenceNamespace) ? false : true;

        return $fqcn ? $namespace.'\\'.$this->getModelName() : $this->getModelName();
    }
869607
public function create(string $className, string $typeName): Type
    {
        $type = new InputObjectType([
            'name' => $typeName,
            'description' => 'Type to specify join tables in a filter',
            'fields' => function () use ($className): array {
                return $this->getJoinsFields($className);
            },
        ]);

        return $type;
    }
1230889
public function create(string $className, string $typeName): Type
    {
        $type = new InputObjectType([
            'name' => $typeName,
            'fields' => function () use ($className, $typeName): array {
                $fieldsEnum = new EnumType([
                    'name' => $typeName . 'Field',
                    'values' => $this->getPossibleValues($className),
                    'description' => 'Fields available for `' . $typeName . '`',
                ]);
                $this->types->registerInstance($fieldsEnum);

                return [
                    [
                        'name' => 'field',
                        'type' => Type::nonNull($fieldsEnum),
                    ],
                    [
                        'name' => 'nullAsHighest',
                        'type' => Type::boolean(),
                        'description' => 'If true `NULL` values will be considered as the highest value, so appearing last in a `ASC` order, and first in a `DESC` order.',
                        'defaultValue' => false,
                    ],
                    [
                        'name' => 'order',
                        'type' => $this->types->get('SortingOrder'),
                        'defaultValue' => 'ASC',
                    ],
                ];
            },
        ]);

        return $type;
    }
369576
public static function validateType($typeName)
    {
        if (substr($typeName, -2) == "[]") {
            return self::validateNamingConvention(substr($typeName, 0, -2)) . "[]";
        }

        switch (strtolower($typeName)) {
            case "int":
            case "integer":
            case "long":
            case "byte":
            case "short":
            case "negativeinteger":
            case "nonnegativeinteger":
            case "nonpositiveinteger":
            case "positiveinteger":
            case "unsignedbyte":
            case "unsignedint":
            case "unsignedlong":
            case "unsignedshort":
                return 'int';
                break;
            case "float":
            case "double":
            case "decimal":
                return 'float';
                break;
            case "<anyxml>":
            case "string":
            case "token":
            case "normalizedstring":
            case "hexbinary":
                return 'string';
                break;
            case "datetime":
                return  '\DateTime';
                break;
            default:
                $typeName = self::validateNamingConvention($typeName);
                break;
        }

        if (self::isKeyword($typeName)) {
            $typeName .= self::NAME_SUFFIX;
        }

        return $typeName;
    }
162961
public function create(string $className, string $typeName): Type
    {
        $description = 'To be used as a filter for objects of type `' . Utils::getTypeName($className) . '`';

        $fieldsGetter = function () use ($className, $typeName): array {
            $configuration = [
                [
                    'name' => 'groups',
                    'type' => Type::listOf(Type::nonNull($this->getGroupType($className, $typeName))),
                ],
            ];

            return $configuration;
        };

        $filterType = new InputObjectType([
            'name' => $typeName,
            'description' => $description,
            'fields' => $fieldsGetter,
        ]);
        $this->types->registerInstance($filterType);

        return $filterType;
    }
1082350
private function classNameFromLegacyNamespace($className)
    {
        $lastUnderscore = strrpos($className, '_');
        if ($lastUnderscore) {
            $className = substr($className, $lastUnderscore + 1);
        }

        return $className;
    }
185486
private function getRegionZonesByTypeName($typeName)
    {
        return $this->getRegionZones()->filter(
            function($regionZone) use ($typeName) {
                return $regionZone->getType()->getName() === $typeName;
            }
        );
    }
732689
private function _checkTypeNameFileNameMatch($typeName) {
		/* currentFilename holds file path - get basename */
		$fileBaseName = basename($this->_currentFilename);
		/*
		 * quick n dirty - append '.' to type name to ensure that we don't miss something like Foo1.php and Foo
		 */
		if ($this->_isActive('typeNameMatchesFileName') && !(substr($fileBaseName, 0, strlen($typeName) + 1) === $typeName . ".")) {
			$msg = $this->_getMessage('TYPE_FILE_NAME_MISMATCH', $typeName, $fileBaseName);
			$this->_writeError('typeNameMatchesFileName', $msg);
		}
	}
577472
public static function namedType(string $typeName): NamedTypeNode
    {
        return self::validateType(
            self::parseType($typeName),
            NamedTypeNode::class
        );
    }
262894
public function resolve(string $typeName): string
    {
        if (!isset($this->cache[$typeName])) {
            foreach ($this->resourceNamespaces as $resourceNamespace) {
                if (class_exists($this->cache[$typeName] = $this->qualify($resourceNamespace, $typeName))) {
                    return $this->cache[$typeName];
                }
            }

            throw new ClassNotFoundException(
                sprintf(
                    "Did not find type '%s' in namespace(s) '%s'.",
                    $typeName,
                    implode(', ', $this->resourceNamespaces)
                )
            );
        }

        return $this->cache[$typeName];
    }
70878
public static function getMappedClassName($className)
    {
        $mappedName = array_search($className, self::$classMap);

        if ($mappedName) {
            return $mappedName;
        }

        $mappedName = array_search($className, array_flip(self::$classMap));

        if ($mappedName) {
            return $mappedName;
        }

        return false;
    }
608413
public function create(string $className, string $typeName): Type
    {
        $typeName = Utils::getTypeName($className);
        $description = $this->getDescription($className);

        $fieldsGetter = function () use ($className): array {
            $factory = new OutputFieldsConfigurationFactory($this->types, $this->entityManager);
            $configuration = $factory->create($className);

            return $configuration;
        };

        return new ObjectType([
            'name' => $typeName,
            'description' => $description,
            'fields' => $fieldsGetter,
        ]);
    }
761713
private static function prepareMapping($className)
    {
        $mapping = [];
        foreach (self::$languages as $iso_639_2t) {
            if (true === isset(self::$langToAnalyzer[$iso_639_2t])) {
                switch ($className) {
                    case StaticValues::class :
                        self::$staticMapping['properties'][Search::STATIC_VALUES_FILED]['properties']['slug_' . $iso_639_2t] = self::$slugMap;
                        self::$staticValueMap['analyzer'] = self::$langToAnalyzer[$iso_639_2t];
                        self::$staticMapping['properties'][Search::STATIC_VALUES_FILED]['properties']['value_' . $iso_639_2t] = self::$staticValueMap;
                        $mapping = self::$staticMapping;
                        break;
                    case EAV::class :
                        self::$eavValueMap['analyzer'] = self::$langToAnalyzer[$iso_639_2t];
                        self::$eavMapping['properties'][Search::EAV_FIELD]['properties']['str_value_' . $iso_639_2t] = self::$staticValueMap;
                        self::$eavMapping['properties'][Search::EAV_FIELD]['properties']['txt_value_' . $iso_639_2t] = self::$staticValueMap;
                        $mapping = self::$eavMapping;
                        break;
                }
            }
        }
        return $mapping;
    }