Doctrine\ODM\PHPCR\Mapping\ClassMetadata::getIdentifierValues PHP Method

getIdentifierValues() public method

Since PHPCR only allows exactly one identifier field this is a proxy to {@see \getIdentifierValue()} and returns an array with the identifier field as a key. If there is no identifier mapped, returns an empty array as per the specification.
public getIdentifierValues ( object $document ) : array
$document object
return array
    public function getIdentifierValues($document)
    {
        try {
            return array($this->identifier => $this->getIdentifierValue($document));
        } catch (PHPCRException $e) {
            return array();
        }
    }
ClassMetadata