final public static function fromString(string $string): Enum
    {
        $parts = explode('::', $string);

        return self::fromName(end($parts));
    }
final public static function fromString(string $string): Enum
    {
        $parts = explode('::', $string);

        return self::fromName(end($parts));
    }
final public static function fromString ( string $ string ) : Enum { $ parts = explode ( '::' , $ string ) ; return self :: fromName ( end ( $ parts ) ) ; }
Creates instance from a string representation

@param string $string The string representation

@return Enum

@throws DomainException When the string is invalid
Creates instance from a string representation