Retrieves enum member names and values

@return array

@throws DomainException When more than one constant has the same value
18117
final public static function getMembers(): array
    {
        if (!isset(self::$constants[static::class])) {
            $reflection = new ReflectionClass(static::class);
            $constants = self::sortConstants($reflection);
            self::guardConstants($constants);
            self::$constants[static::class] = $constants;
        }

        return self::$constants[static::class];
    }
299408
public function getDomains()
    {
        $res = $this->doRequest('GET_DOMAINS');
        if (!$res) {
            return false;
        }

        $domains = array();

        for ($i = 1; $i <= $res['domains']; ++$i) {
            $dom = 'domain'.$i;
            $classes = array();

            // Associate classes to current domain (class name => mindevcount)
            for ($j = 1; $j <= $res[$dom.'classes']; ++$j) {
                $classes[$res[$dom.'class'.$j.'name']] = $res[$dom.'class'.$j.'mindevcount'];
            }

            $domains[] = array('name' => $res[$dom], 'classes' => $classes);
        }

        return $domains;
    }
271560
private function getEnum()
     {

        $enumResult = $this->db->query(
            new Raw( <<<SQL
                SELECT
                    t.typname as name,
                    n.nspname as schema,
                    array_agg( e.enumlabel ORDER BY e.enumsortorder ) as labels
                FROM
                    pg_enum e
                INNER JOIN
                    pg_type t ON e.enumtypid = t.oid
                INNER JOIN
                    pg_namespace n ON t.typnamespace = n.oid
                WHERE
                    n.nspname = ANY( current_schemas(false) )
                GROUP BY
                    t.typname, t.oid, n.nspname
                ORDER BY
                    schema, t.typname ASC
SQL
             )
        );

        $output = [];
        foreach( $enumResult->fetch(Result::FLATTEN_PREVENT | Result::TYPE_DETECT) as $data ) {
            $output[$data['name']] = $data['labels'];
        }

        return new Enum($output);

     }
760815
public function getMembershipTypes() {
    $types = [];
    $membership_ids = $this->queryFactory->get('node')
      ->condition('type', 'membership')
      ->condition('status', 1)
      ->execute();

    if (!$membership_ids) {
      return $types;
    }

    $storage = $this->entityTypeManager->getStorage('node');
    $builder = $this->entityTypeManager->getViewBuilder('node');
    $memberships = $storage->loadMultiple($membership_ids);

    foreach ($memberships as $membership) {
      $membership_id = $membership->id();
      $types[$membership_id] = [
        'title' => $membership->title->value,
        'description' => $builder->view($membership, 'calc_preview'),
      ];
    }

    return $types;
  }
19032
final public static function getValues(): array
    {
        if (isset(self::$cache[static::class])) {
            return self::$cache[static::class];
        }

        $rc = new \ReflectionClass(static::class);

        return self::$cache[static::class] = $rc->getConstants();
    }
481883
public function getValues($type = null)
    {
        if ($type == null) {
            return $this->values;
        }

        $converter  = $this->converterFactory->getConverter($type);
        $resultList = [];

        foreach ($this->values as $riakObject) {
            $reference = new RiakObjectReference($riakObject, $this->location, $type);
            $converted = $converter->toDomain($reference);

            $resultList[] = $converted;
        }

        return new DomainObjectList($resultList);
    }
667657
public function getNames(){
		
		$isSet = PHPArray::filter(static::getConstants(), function($value){
			return $this->hasFlag($value);
		});
		
		return \array_keys($isSet);
		
	}
399197
protected function getClassNameOptions()
    {
        $hidden  = [];
        $classes = [];
        
        foreach ($this->dbObject('ClassName')->enumValues() as $class) {
            
            if ($class == self::class || !in_array($class, ClassInfo::subclassesFor($this))) {
                continue;
            }
            
            if ($hide = Config::inst()->get($class, 'hide_ancestor')) {
                $hidden[$hide] = true;
            }
            
            if (!$class::singleton()->canCreate()) {
                continue;
            }
            
            $classes[$class] = $class::singleton()->i18n_singular_name();
            
        }
        
        foreach ($hidden as $class => $hide) {
            unset($classes[$class]);
        }
        
        return $classes;
    }
1195396
public static function getAllNames()
    {
        $className = get_called_class();

        if (!array_key_exists($className, self::$constantsArray)) {
            try {
                $class = new ReflectionClass($className);
            } catch (ReflectionException $e) {
                throw new RuntimeException($e->getMessage(), (int)$e->getCode(), $e);
            }

            self::$constantsArray[$className] = array_keys($class->getConstants());
        }

        return self::$constantsArray[$className];
    }
745502
public function getPropertyNames() {
    return array_map(function (ClassMemberNode $property) {
      return ltrim($property->getName(), '$');
    }, $this->getProperties()->toArray());
  }
103228
public static function enumTypes() {
        return [
            DataTablesColumnInterface::DATATABLES_TYPE_DATE,
            DataTablesColumnInterface::DATATABLES_TYPE_HTML,
            DataTablesColumnInterface::DATATABLES_TYPE_HTML_NUM,
            DataTablesColumnInterface::DATATABLES_TYPE_NUM,
            DataTablesColumnInterface::DATATABLES_TYPE_NUM_FMT,
            DataTablesColumnInterface::DATATABLES_TYPE_STRING,
        ];
    }
519079
public List<String> getDomainObjectTypeNames() {
		List<DomainObjectType> types = getDomainObjectTypes();
		List<String> typeNames = new ArrayList<String>(types.size());
		for (DomainObjectType typ : types) {
			typeNames.add(typ.getTypeName());
		}
		return typeNames;
	}
596016
final public function getIdentifiers()
    {
        // Lower-case all identifiers to make it easier to find duplicate identifiers
        $identifiers = array_map('strtolower', $this->identifiers);

        if (! $this->validatedIdentifiers) {
            foreach ($identifiers as $identifier) {
                $this->validateIdentifier($identifier);
            }

            if (sizeof(array_unique($identifiers)) != sizeof($identifiers)) {
                throw new \DomainException('Error: Identifier duplicate found');
            }

            $this->validatedIdentifiers = true;
        }

        return $identifiers;
    }
251964
public function getValues()
    {
        $values = $this->entity->getValues();
        $result = [];
        if ($values) {
            foreach ($values as $value) {
                $result[] = new OperatorValue($value, $this->locale);
            }

            return $result;
        }

        return;
    }
1056844
public function getEnum()
    {
        $classNames = ClassInfo::subclassesFor($this->getBaseClass());
        $dataobject = strtolower(DataObject::class);
        unset($classNames[$dataobject]);
        return array_values($classNames);
    }
843906
public static String[] getNames(Class<? extends Enum<?>> e) {
    return Arrays.toString(e.getEnumConstants()).replaceAll("^.|.$", "").split(", ");
  }
1346322
public String[] getValueNames() {
        if (!_iSession.isValid())
            throw new IllegalStateException();
        Enumeration enumeration = this.getAttributeNames();
        Vector valueNames = new Vector();
        String name = null;
        while (enumeration.hasMoreElements()) {
            name = (String) enumeration.nextElement();
            valueNames.add(name);
        }
        String[] names = new String[valueNames.size()];
        return (String[]) valueNames.toArray(names);
    }