src/Hydrator.php
public function extractType(EntityMetadata $metadata, array $record)
    {
        if (false === $metadata->isPolymorphic()) {
            return $metadata->type;
        }
        return $this->extractField(Persister::POLYMORPHIC_KEY, $record);
    }
public function extractType(EntityMetadata $metadata, array $record)
    {
        if (false === $metadata->isPolymorphic()) {
            return $metadata->type;
        }
        return $this->extractField(Persister::POLYMORPHIC_KEY, $record);
    }
public function extractType ( EntityMetadata $ metadata , array $ record ) { if ( false === $ metadata -> isPolymorphic ( ) ) { return $ metadata -> type ; } return $ this -> extractField ( Persister :: POLYMORPHIC_KEY , $ record ) ; }
Extracts the model type from a raw MongoDB record.

@param   EntityMetadata  $metadata
@param   array           $record
@return  string
@throws  PersisterException
Extracts the model type from a raw MongoDB record .