Skeerel/Util/Enum.php
public static function fromKey($name)
    {
        foreach (static::values() as $key => $enumInstance) {
            if ($enumInstance->getKey() === $name) {
                return $enumInstance;
            }
        }

        return null;
    }
public static function fromKey($name)
    {
        foreach (static::values() as $key => $enumInstance) {
            if ($enumInstance->getKey() === $name) {
                return $enumInstance;
            }
        }

        return null;
    }
public static function fromKey ( $ name ) { foreach ( static :: values ( ) as $ key => $ enumInstance ) { if ( $ enumInstance -> getKey ( ) === $ name ) { return $ enumInstance ; } } return null ; }
Returns Enum by key

@return static
Returns Enum by key