private function getClassDiscriminatorValues(ClassMetadata $metadata) : array
    {
        $discriminatorValues = [];

        if ($metadata->discriminatorValue !== null) {
            $discriminatorValues[] = $metadata->discriminatorValue;
        }

        foreach ($metadata->subClasses as $className) {
            $key = array_search($className, $metadata->discriminatorMap);
            if (! $key) {
                continue;
            }

            $discriminatorValues[] = $key;
        }

        // If a defaultDiscriminatorValue is set and it is among the discriminators being queries, add NULL to the list
        if ($metadata->defaultDiscriminatorValue && in_array($metadata->defaultDiscriminatorValue, $discriminatorValues)) {
            $discriminatorValues[] = null;
        }

        return $discriminatorValues;
    }
private function getClassDiscriminatorValues(ClassMetadata $metadata) : array
    {
        $discriminatorValues = [];

        if ($metadata->discriminatorValue !== null) {
            $discriminatorValues[] = $metadata->discriminatorValue;
        }

        foreach ($metadata->subClasses as $className) {
            $key = array_search($className, $metadata->discriminatorMap);
            if (! $key) {
                continue;
            }

            $discriminatorValues[] = $key;
        }

        // If a defaultDiscriminatorValue is set and it is among the discriminators being queries, add NULL to the list
        if ($metadata->defaultDiscriminatorValue && in_array($metadata->defaultDiscriminatorValue, $discriminatorValues)) {
            $discriminatorValues[] = null;
        }

        return $discriminatorValues;
    }
private function getClassDiscriminatorValues ( ClassMetadata $ metadata ) : array { $ discriminatorValues = [ ] ; if ( $ metadata -> discriminatorValue !== null ) { $ discriminatorValues [ ] = $ metadata -> discriminatorValue ; } foreach ( $ metadata -> subClasses as $ className ) { $ key = array_search ( $ className , $ metadata -> discriminatorMap ) ; if ( ! $ key ) { continue ; } $ discriminatorValues [ ] = $ key ; } // If a defaultDiscriminatorValue is set and it is among the discriminators being queries, add NULL to the list if ( $ metadata -> defaultDiscriminatorValue && in_array ( $ metadata -> defaultDiscriminatorValue , $ discriminatorValues ) ) { $ discriminatorValues [ ] = null ; } return $ discriminatorValues ; }
Returns the list of discriminator values for the given ClassMetadata
Returns the list of discriminator values for the given ClassMetadata