src/Enum/Enum.php
public static function fromValue($value)
    {
        $values = static::getValues();
        if (array_key_exists($value, $values)) {
            return new static($values[$value], $value);
        }
        throw new \InvalidArgumentException("No enum constant value '$value' class " . get_called_class());
    }
public static function fromValue($value)
    {
        $values = static::getValues();
        if (array_key_exists($value, $values)) {
            return new static($values[$value], $value);
        }
        throw new \InvalidArgumentException("No enum constant value '$value' class " . get_called_class());
    }
public static function fromValue ( $ value ) { $ values = static :: getValues ( ) ; if ( array_key_exists ( $ value , $ values ) ) { return new static ( $ values [ $ value ] , $ value ) ; } throw new \ InvalidArgumentException ( "No enum constant value '$value' class " . get_called_class ( ) ) ; }
Gets the enum instance for the value

@return Enum
Gets the enum instance for the value