private function getDiscriminatorValues($classNames) : array
    {
        $discriminatorValues = [];
        $collections         = [];
        foreach ($classNames as $className) {
            $class                 = $this->dm->getClassMetadata($className);
            $discriminatorValues[] = $class->discriminatorValue;
            $key                   = $this->dm->getDocumentDatabase($className)->getDatabaseName() . '.' . $class->getCollection();
            $collections[$key]     = $key;
        }
        if (count($collections) > 1) {
            throw new InvalidArgumentException('Documents involved are not all mapped to the same database collection.');
        }
        return $discriminatorValues;
    }
private function getDiscriminatorValues($classNames) : array
    {
        $discriminatorValues = [];
        $collections         = [];
        foreach ($classNames as $className) {
            $class                 = $this->dm->getClassMetadata($className);
            $discriminatorValues[] = $class->discriminatorValue;
            $key                   = $this->dm->getDocumentDatabase($className)->getDatabaseName() . '.' . $class->getCollection();
            $collections[$key]     = $key;
        }
        if (count($collections) > 1) {
            throw new InvalidArgumentException('Documents involved are not all mapped to the same database collection.');
        }
        return $discriminatorValues;
    }
private function getDiscriminatorValues ( $ classNames ) : array { $ discriminatorValues = [ ] ; $ collections = [ ] ; foreach ( $ classNames as $ className ) { $ class = $ this -> dm -> getClassMetadata ( $ className ) ; $ discriminatorValues [ ] = $ class -> discriminatorValue ; $ key = $ this -> dm -> getDocumentDatabase ( $ className ) -> getDatabaseName ( ) . '.' . $ class -> getCollection ( ) ; $ collections [ $ key ] = $ key ; } if ( count ( $ collections ) > 1 ) { throw new InvalidArgumentException ( 'Documents involved are not all mapped to the same database collection.' ) ; } return $ discriminatorValues ; }
Get Discriminator Values

@param string[] $classNames

@throws InvalidArgumentException If the number of found collections > 1.
Get Discriminator Values