Returns the enum class. Supports 'FQCN\Class@method()' notation

@param $key

@return mixed
16534
private function getEnumClass($key)
    {
        $result = $this->enums[$key];
        if (strpos($result, '@')) {
            $class  = str_before($result, '@');
            $method = str_after($result, '@');

            // If no namespace was set, prepend the Model's namespace to the
            // class that resolves the enum class. Prevent this behavior,
            // by setting the resolver class with a leading backslash
            if (class_basename($class) == $class) {
                $class =
                    str_replace_last(
                        class_basename(get_class($this)),
                        $class,
                        self::class
                    );
            }

            $result = $class::$method();
        }

        return $result;
    }
255112
private static function getSchemaType($column)
    {
        // primary key
        if ($column->isPrimaryKey && $column->autoIncrement) {
            if ('bigint' === $column->type) {
                return 'bigPrimaryKey()';
            }
            return 'primaryKey()';
        }

        // boolean
        if ('tinyint(1)' === $column->dbType) {
            return 'boolean()';
        }

        // smallint
        if ('smallint' === $column->type) {
            if (null === $column->size) {
                return 'smallInteger()';
            }
            return 'smallInteger';
        }

        // bigint
        if ('bigint' === $column->type) {
            if (null === $column->size) {
                return 'bigInteger()';
            }
            return 'bigInteger';
        }

        // enum
        if (null !== $column->enumValues) {
            // https://github.com/yiisoft/yii2/issues/9797
            $enumValues = array_map('addslashes', $column->enumValues);
            return "enum(['".implode('\', \'', $enumValues)."'])";
        }

        // others
        if (null === $column->size && 0 >= $column->scale) {
            return $column->type.'()';
        }
        return $column->type;
    }
706187
public static function resolve( $key )
	{
		if ( strpos( $key, '\\' ) !== false )
			return static::resolveClass( $key );

		$key = explode( '.', $key );

		if ( $resolver = static::getResolver( $key[0] ) )
			return $resolver->resolve( $key[0], implode( '.', array_slice( $key, 1 ) ) );

		return null;
	}
1299197
private function getUsingLoaderMethod($key)
    {
        $value = false;

        $loader_method = $this->getLoaderMethod($key);
        if (method_exists($this, $loader_method)) {
            if ($this->hasSubDataObject($key)) {
                // return loaded sub-dataobject
                $value = $this->getSubDataObject($key);
            } else {
                // use loader method to load sub-dataobject
                $this->checkDB();
                $this->setSubDataObject(
                    $key,
                    call_user_func(array($this, $loader_method))
                );

                $value = $this->getSubDataObject($key);
            }
        }

        return $value;
    }
104923
protected function castToEnum($key, $value): ?Enum
    {
        $enum = $this->enumCasts[$key];

        if ($value === null || $value instanceOf Enum) {
            return $value;
        } else {
            return $enum::getInstance($value);
        }
    }
55753
protected function get($key)
    {
        $this->loadConfigurationLazily();

        if ($this->hasConfigurationValue($key)) {
            $result = $this->configuration[$key];
        } else {
            $result = '';
        }

        return $result;
    }
253481
public static function key($key)
    {
        $config = static::where('key', $key)->first();

        return $config->value ?? config($key, null);
    }
716250
public Class<?> getType(String key) {
        Object val = this.data.get(key);
        return val == null ? null : val.getClass();
    }
837610
public function getNameByKey($key)
    {
        return (array_key_exists($key, $this->_languages)) ? $this->_languages[$key] : null;
    }
864457
protected function getKey($key, $class)
    {
        if ($key === null || !is_string($key)) {
            $class_path = (is_string($class)) ? $class : get_class($class);

            $key = explode('\\', $class_path);
            $key = end($key);
        }

        return Helper::snakeCase($key);
    }
444088
public function make($key)
    {
        // Check if set
        if (!isset($this->keys[$key])) {
            throw new \InvalidArgumentException('Identifier "'. $key .'" is not defined.');
        }

        // Check if it is a simple value (string, int etc) that
        // should be returned
        if (
            !is_object($this->raw[$key])
            || !method_exists($this->raw[$key], '__invoke')
        ) {
            return $this->raw[$key];
        }

        if ($this->types[$key] === self::TYPE_SINGLETON) {
            if (isset($this->resolved[$key])) {
                return $this->resolved[$key];
            }

            $this->locked[$key] = true;
            return $this->resolved[$key] = $this->raw[$key]($this);
        }

        // Return multiton
        return $this->raw[$key]($this);
    }
11336
public static function get($enum)
    {
        if (null === self::$ClassNames) {
            self::generateNamespace();
            self::generateClassNamesArray();
        }

        if (!isset(self::$ClassNames[$enum])) {
            throw new \InvalidArgumentException('Invalid enum "'.$enum.'".');
        }

        $className = self::$Namespace.'\\'.self::$ClassNames[$enum];

        return new $className();
    }
966020
public function get($key)
    {
        if (!$this->isEnabled()) {
            return null;
        }

        return unserialize(eaccelerator_get($this->prefix() . $key));
    }
41624
public static function isValidKey($key) {
        if(!is_string($key)) {
            throw EnumerationException::invalidKeyType(gettype($key));
        }

        return array_key_exists($key, self::toArray());
    }
593468
public function parseKey($key)
    {
        if ($key === 'number') {
            return $this->getManager()->getNumberManager()->parseKey();
        }

        return parent::parseKey($key);
    }
1226282
public function get($key)
    {
        if (!isset($this->_data[$key])) {
            $this->_data[$key] = new $this->_obClass();
        }

        return $this->_data[$key];
    }
1299115
public function getAttributeValue($key)
    {
        $value = parent::getAttributeValue($key);

        if ($this->hasEnumCast($key)) {
            $value = $this->castToEnum($key, $value);
        }

        return $value;
    }