Doctrine\ODM\MongoDB\Mapping\ClassMetadataInfo::getFieldValue PHP Method

getFieldValue() public method

Gets the specified field's value off the given document.
public getFieldValue ( object $document, string $field ) : mixed
$document object
$field string
return mixed
    public function getFieldValue($document, $field)
    {
        if ($document instanceof Proxy && $field !== $this->identifier && !$document->__isInitialized()) {
            $document->__load();
        }
        return $this->reflFields[$field]->getValue($document);
    }
ClassMetadataInfo