src/Enums/EnumTrait.php
public static function getNameValue($name)
    {
        static::initialize();

        if (!static::isValidName($name)) {
            throw new \InvalidArgumentException(sprintf(
                'The enum name "%s" is not valid. Expected one of: %s',
                $name,
                implode(', ', static::names())
            ));
        }

        return static::$constants[static::$lcKeyMap[strtolower($name)]];
    }
public static function getNameValue($name)
    {
        static::initialize();

        if (!static::isValidName($name)) {
            throw new \InvalidArgumentException(sprintf(
                'The enum name "%s" is not valid. Expected one of: %s',
                $name,
                implode(', ', static::names())
            ));
        }

        return static::$constants[static::$lcKeyMap[strtolower($name)]];
    }
public static function getNameValue ( $ name ) { static :: initialize ( ) ; if ( ! static :: isValidName ( $ name ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The enum name "%s" is not valid. Expected one of: %s' , $ name , implode ( ', ' , static :: names ( ) ) ) ) ; } return static :: $ constants [ static :: $ lcKeyMap [ strtolower ( $ name ) ] ] ; }
Get the enum value from its name.

@param string $name
@return mixed
Get the enum value from its name .