public static function toArray() {
        $enumClass = get_called_class();

        if(!array_key_exists($enumClass, self::$cache)) {
            $reflector = new ReflectionClass($enumClass);
            self::$cache[$enumClass] = $reflector->getConstants();
        }

        return self::$cache[$enumClass];
    }
public static function toArray() {
        $enumClass = get_called_class();

        if(!array_key_exists($enumClass, self::$cache)) {
            $reflector = new ReflectionClass($enumClass);
            self::$cache[$enumClass] = $reflector->getConstants();
        }

        return self::$cache[$enumClass];
    }
public static function toArray ( ) { $ enumClass = get_called_class ( ) ; if ( ! array_key_exists ( $ enumClass , self :: $ cache ) ) { $ reflector = new ReflectionClass ( $ enumClass ) ; self :: $ cache [ $ enumClass ] = $ reflector -> getConstants ( ) ; } return self :: $ cache [ $ enumClass ] ; }
Translate the current enumeration to an associative array

@return array
Translate the current enumeration to an associative array