Returns the array of all value singletons of one Enum class

@param string $fqcn FQCN of the enum

@return Enum[]
196888
private final static function &getInstances($fqcn)
    {
        if (!isset(self::$instances[$fqcn])) {
            self::loadClass($fqcn);
        }

        return self::$instances[$fqcn];
    }
1050689
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;
  }
69998
public static function getConstList() : array
    {
        if (static::$constList === null) {
            $reflection        = new ReflectionClass(get_called_class());
            static::$constList = array_values($reflection->getConstants());
        }

        return static::$constList;
    }
1089202
public EnumT[] values() {
    Collection<EnumT> valueCollection = knownValues.values();

    @SuppressWarnings("unchecked")
    final EnumT[] valueArray = (EnumT[]) Array.newInstance(clazz, valueCollection.size());
    int i = 0;
    for (EnumT enumV : valueCollection) {
      valueArray[i] = enumV;
      i++;
    }

    return valueArray;
  }
1331064
public function getSimpleTypesFromUnion( $qname )
	{
		$name = $qname instanceof QName ? "{$qname->prefix}:{$qname->localName}" : $qname;

		while (true)
		{
			if ( ! $this->hasType( $name ) ) return array();

			$type = $this->getType( $name );
			if ( isset( $type['restrictionType'] ) && $type['restrictionType'] == 'union' )
			{
				return $type['types'];
			}

			if ( ! isset( $type['parent'] ) ) return array();
			$name = $type['parent'];

		}
	}
586002
protected function splitFullQualifyClassName($fqcn)
    {
        $parts = explode('\\', $fqcn);
        $classname = array_pop($parts);
        return [implode('\\', $parts), $classname];
    }
963653
public static function getServiceConditionals($value)
    {
        $services = array();

        if (is_array($value)) {
            foreach ($value as $v) {
                $services = array_unique(array_merge($services, self::getServiceConditionals($v)));
            }
        } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) {
            $services[] = (string) $value;
        }

        return $services;
    }
1056844
public function getEnum()
    {
        $classNames = ClassInfo::subclassesFor($this->getBaseClass());
        $dataobject = strtolower(DataObject::class);
        unset($classNames[$dataobject]);
        return array_values($classNames);
    }
448483
public static function getCache(): array
    {
    	$caller = static::class;

        if (!array_key_exists($caller, self::$cache)) {
            try {
                $reflected_caller = new \ReflectionClass($caller);
                self::$cache[$caller] = $reflected_caller->getConstants();
            } catch (\ReflectionException $re) {
                throw EnumerableException::reflectionError($re->getMessage());
            }
        }

        return self::$cache[$caller];
    }
1206127
public function enumValuesForField($tableName, $fieldName)
    {
        $classes = array();

        // Get the enum of all page types from the SiteTree table
        $clause = $this->getConstraintCheckClause($tableName, $fieldName);
        if ($clause) {
            $classes = $this->enumValuesFromCheckClause($clause);
        }

        return $classes;
    }
331943
public function get(string $fqcn): ProxyInterface
    {
        $mock = $this->mockingStrategy->build($fqcn);
        $mockFQCN = \get_class($this->mockingStrategy->get($mock));
        $mockClass = new \ReflectionClass($mockFQCN);

        $proxyCode = ClassTemplate::generate($mockClass);
        $proxyFQCN = eval($proxyCode);

        return $this->getInstance($proxyFQCN)
            ->__moka_setMock($mock)
            ->__moka_setMockingStrategy($this->mockingStrategy);
    }
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();
    }
509025
final public static function all() : array
    {
        static $all = null;

        if ($all === null) {
            foreach ((new \ReflectionClass(get_called_class()))->getConstants() as $constant) {
                $all[] = new static($constant);
            }
        }

        return $all;
    }
332751
private function getPossibleValues(string $className): array
    {
        $metadata = $this->entityManager->getClassMetadata($className);
        $standard = array_values($metadata->fieldNames);
        $custom = $this->getCustomSortingNames($className);

        return array_merge($standard, $custom);
    }
14273
public Object[] singletonArray(Object value) {
        Object[] result = new Object[1];
        result[0] = value;
        return result;
    }
13086
public function getEnumerations()
    {
        $enums = array();
        foreach ($this->element->getElementsByTagName('enumeration') as $enum) {
            $enums[] = $enum->getAttribute('value');
        };
        return $enums;
    }
875314
protected function getValuesFromFlagOrEnum($flag)
    {
        $values = [];

        if ($flag instanceof static) {
            foreach ($flag->getNames() as $enum) {
                $values[] = static::getNameValue($enum);
            }
        } elseif (static::isValidName((string) $flag)) {
            $values[] = static::getNameValue((string) $flag);
        } elseif (is_numeric($flag)) {
            $values[] = $flag;
        }

        return $values;
    }