public static function all()
    {
        $result = [];
        foreach (self::getConstants() as $k => $v) {
            if (static::isValid($v)) {
                /** @var Value $object */
                $object = new static($v);
                $result[$object->getValue()] = $object;
            }
        }

        return $result;
    }
public static function all()
    {
        $result = [];
        foreach (self::getConstants() as $k => $v) {
            if (static::isValid($v)) {
                /** @var Value $object */
                $object = new static($v);
                $result[$object->getValue()] = $object;
            }
        }

        return $result;
    }
public static function all ( ) { $ result = [ ] ; foreach ( self :: getConstants ( ) as $ k => $ v ) { if ( static :: isValid ( $ v ) ) { /** @var Value $object */ $ object = new static ( $ v ) ; $ result [ $ object -> getValue ( ) ] = $ object ; } } return $ result ; }
Returns array of all Enum instances index by their values.

@return Enum[] Constant name => Enum
Returns array of all Enum instances index by their values .