lib/EnumTrait.php
final static function getEntries(): array {
    static $entries;
    if (!isset($entries)) {
      $entries = [];
      foreach ((new \ReflectionClass(static::class))->getConstants() as $name => $value) {
        $reflection = new \ReflectionClassConstant(static::class, $name);
        if ($reflection->isPublic()) $entries[$name] = $reflection->getValue();
      }
    }

    return $entries;
  }
final static function getEntries(): array {
    static $entries;
    if (!isset($entries)) {
      $entries = [];
      foreach ((new \ReflectionClass(static::class))->getConstants() as $name => $value) {
        $reflection = new \ReflectionClassConstant(static::class, $name);
        if ($reflection->isPublic()) $entries[$name] = $reflection->getValue();
      }
    }

    return $entries;
  }
final static function getEntries ( ) : array { static $ entries ; if ( ! isset ( $ entries ) ) { $ entries = [ ] ; foreach ( ( new \ ReflectionClass ( static :: class ) ) -> getConstants ( ) as $ name => $ value ) { $ reflection = new \ ReflectionClassConstant ( static :: class , $ name ) ; if ( $ reflection -> isPublic ( ) ) $ entries [ $ name ] = $ reflection -> getValue ( ) ; } } return $ entries ; }
Gets an associative array of the pairs of names and values of the constants in this enumeration.
@return array An associative array that contains the pairs of names and values of the constants in this enumeration.
Gets an associative array of the pairs of names and values of the constants in this enumeration .