public function getIdentifierValue($document)
    {
        if (!$this->identifier) {
            throw new PHPCRException(sprintf(
                'Class %s has no identifier field mapped. Please use $documentManager->getUnitOfWork()->getDocumentId($document) to get the id of arbitrary documents.',
                $this->name
            ));
        }

        return (string) $this->getFieldValue($document, $this->identifier);
    }
public function getIdentifierValue($document)
    {
        if (!$this->identifier) {
            throw new PHPCRException(sprintf(
                'Class %s has no identifier field mapped. Please use $documentManager->getUnitOfWork()->getDocumentId($document) to get the id of arbitrary documents.',
                $this->name
            ));
        }

        return (string) $this->getFieldValue($document, $this->identifier);
    }
public function getIdentifierValue ( $ document ) { if ( ! $ this -> identifier ) { throw new PHPCRException ( sprintf ( 'Class %s has no identifier field mapped. Please use $documentManager->getUnitOfWork()->getDocumentId($document) to get the id of arbitrary documents.' , $ this -> name ) ) ; } return ( string ) $ this -> getFieldValue ( $ document , $ this -> identifier ) ; }
Gets the document identifier.

@param object $document

@return string $id
Gets the document identifier .