Gets a interface type with a given name.

@param string $fullName The name of the interface.
@return InterfaceType
160326
public static function ofInterface($fullName)
    {
        $result = self::of($fullName);
        if (!($result instanceof InterfaceType))
            throw new InvalidArgumentException("Argument 'fullName' does not describe an interface.");
        return $result;
    }
480770
public static function current($full = false)
    {
        if (empty(static::$_current)) {
            return '';
        } elseif ($full === false) {
            return static::$_current;
        }

        return static::$_modes[static::$_current];
    }
1337211
public static function get($name)
    {
        $namespaces = config('crude.namespace');

        if (! is_array($namespaces)) {
            $fullName = $namespaces . $name;

            return class_exists($fullName)
                ? new $fullName()
                : null;
        }

        foreach ($namespaces as $namespace) {
            $fullName = $namespace . $name;
            if (class_exists($fullName))
                return new $fullName();
        }

        return null;
    }
173018
public function isReservedName(string $fullName): int
    {
        $temp = explode(' ', strtoupper($fullName));
        if (in_array($temp[0], array_keys($this->reservedNames))) {
            return 0;
        }

        return -1;
    }
1206712
public function getFullName($fullData = null) {
		$result = $this->getEmptyText();
		if (empty($fullData)) {
			return $result;
		}

		$fieldsFullName = [
			[
				CAKE_LDAP_LDAP_ATTRIBUTE_SURNAME,
				CAKE_LDAP_LDAP_ATTRIBUTE_GIVEN_NAME,
				CAKE_LDAP_LDAP_ATTRIBUTE_MIDDLE_NAME
			],
			[
				CAKE_LDAP_LDAP_ATTRIBUTE_DISPLAY_NAME,
				CAKE_LDAP_LDAP_ATTRIBUTE_NAME
			]
		];
		$dataFullName = [];
		foreach ($fieldsFullName[0] as $field) {
			$dataItem = h(Hash::get($fullData, $field));
			if (!empty($dataItem)) {
				$dataFullName[] = mb_ucfirst($dataItem);
			}
		}
		if (count($dataFullName) == 3) {
			$result = implode(' ', $dataFullName);

			return $result;
		}

		foreach ($fieldsFullName[1] as $field) {
			$dataItem = h(Hash::get($fullData, $field));
			if (empty($dataItem)) {
				continue;
			}

			$result = mb_ucfirst($dataItem);
		}

		return $result;
	}
1011195
public function FullName()
    {
        $fullName = $this->Name();
        if ($this->prefix)
            $fullName =  $this->escaper->EscapeIdentifier($this->prefix) . '.' . $fullName;
            
        return $fullName;
    }
1128861
public CachedType get(String fullQualifiedName) {
        CachedType cachedType = lruCache.getIfPresent(fullQualifiedName);
        if (cachedType != null) {
            return cachedType;
        }
        cachedType = softCache.getIfPresent(fullQualifiedName);
        if (cachedType != null) {
            lruCache.put(fullQualifiedName, cachedType);
        }
        return cachedType;
    }
794183
public static function get_type_by_typename($typename) {
        global $DB;
        $cache = cache::make('core', 'repositories');
        if (($repositorytype = $cache->get('typename:'. $typename)) === false) {
            $repositorytype = null;
            if ($record = $DB->get_record('repository', array('type' => $typename))) {
                $repositorytype = new repository_type($record->type, (array)get_config($record->type), $record->visible, $record->sortorder);
                $cache->set('typeid:'. $record->id, $repositorytype);
            }
            $cache->set('typename:'. $typename, $repositorytype);
        }
        return $repositorytype;
    }
1104645
function &interfaceNamed($interfaceName)
    {
        $return = NULL;
        if (isset($this->_interfaces[$interfaceName])) {
            $return =& $this->_interfaces[$interfaceName];
        }

        return $return;
    }
753918
final public static function spaceName(string $fullName = null): string
    {
        $fullName = $fullName ?: self::fullName();
        $fullName = \str_replace('\\', '/', $fullName);

        return \strpos($fullName, '/') ? \dirname($fullName) : null;
    }
360375
public function getFullName(): ?string
    {
        if (null === $this->getName()) {
            return null;
        }

        if (!($this instanceof ElementHasParentInterface)) {
            return $this->getName();
        }

        $parents = $this->getParents();

        if ($parents->empty()) {
            return $this->getName();
        }

        $chain = $parents->append($this);
        $sliced = new Collection();
        foreach ($chain->reverse() as $el) {
            if (null === $el->getName()) {
                break;
            }
            $sliced->prepend($el);
        }
        if (1 === count($sliced)) {
            return $this->getName();
        }

        $names = [];
        $first = $sliced->first();
        foreach ($sliced as $el) {
            if ($el === $first) {
                $names[] = $el->getName();
            } else {
                $names[] = $el->getParent()->searchSame($el);
            }
        }

        return $names[0] . '[' . implode('][', array_slice($names, 1)) . ']';

    }
751382
public function getConstant($constantName)
    {
        if (!\is_string($constantName)) {
            throw new InvalidArgumentException('$constantName must be string type');
        }

        if (empty($constantName)) {
            throw new InvalidArgumentException('$constantName must not be empty: '.$constantName);
        }

        if (isset($this->constants[$constantName])) {
            return $this->constants[$constantName];
        }

        $extendsClassDefinition = $this->getExtendsClassDefinition();
        if ($extendsClassDefinition) {
            if ($extendsClassDefinition->hasConstant($constantName)) {
                return $extendsClassDefinition->getConstant($constantName);
            }
        }

        /*
         * Gets constant from interfaces
         */
        return $this->getConstantFromInterfaces($constantName);
    }
1278365
protected function getClassName($fullClassName)
    {
        if (\mb_strrpos($fullClassName, '\\') === false) {
            return $fullClassName;
        }
        return \mb_substr($fullClassName, \mb_strrpos($fullClassName, '\\') + 1, \mb_strlen($fullClassName));
    }
433270
private function getTypeName($name)
    {
        if (!$name) {
            return null;
        }

        if (is_string($name)) {
            return $name;
        }

        $prefix = '';
        if ($name instanceof NullableType) {
            $name   = $name->type;
            $prefix = '?';
        }

        return $prefix . $this->getFullClassName($name);
    }
1293912
private function getAddressOf($fullName)
    {
        [$firstName, $lastName] = explode(' ', $fullName);

        /** @var AddressInterface $address */
        $address = $this->addressRepository->findOneBy(['firstName' => $firstName, 'lastName' => $lastName]);
        Assert::notNull($address);

        return $address;
    }
160818
protected function splitFullPropName($fullPropName)
    {
        $propInfo = explode(ILocalizedProperty::LOCALE_SEPARATOR, $fullPropName);
        $propName = $propInfo[0];
        $localeId = isset($propInfo[1]) ? $propInfo[1] : null;

        return [$propName, $localeId];
    }
704004
protected function getClassNameByInterface($interfaceName)
    {
        if (array_key_exists($interfaceName, $this->interfaceNameToClassName)) {
            return $this->interfaceNameToClassName[$interfaceName];
        }

        if (0 === $this->countObjectManagers) {
            $this->interfaceNameToClassName[$interfaceName] = false;
            return false;
        } elseif (1 === $this->countObjectManagers) {
            $this->interfaceNameToClassName[$interfaceName] = array_key_exists($interfaceName, $this->baseEntityMap) ? $this->baseEntityMap[$interfaceName] : false;
            return $this->interfaceNameToClassName[$interfaceName];
        }

        foreach ($this->objectManagerToEntityMap as $entityMap) {
            if (array_key_exists($interfaceName, $entityMap)) {
                $this->interfaceNameToClassName[$interfaceName] = $entityMap[$interfaceName];
                return $this->interfaceNameToClassName[$interfaceName];
            }
        }
        $this->interfaceNameToClassName[$interfaceName] = false;
        return $this->interfaceNameToClassName[$interfaceName];
    }