Doctrine\ODM\OrientDB\Mapper\Hydration\Hydrator::fill PHP Метод

fill() защищенный Метод

Given an object and an Orient-object, it fills the former with the latter.
protected fill ( object $document, stdClass $object ) : object
$document object
$object stdClass
Результат object
    protected function fill($document, \stdClass $object)
    {
        $metadata = $this->getMetadataFactory()->getMetadataFor(get_class($document));
        $propertyAnnotations = $this->getMetadataFactory()->getObjectPropertyAnnotations($document);
        foreach ($propertyAnnotations as $property => $annotation) {
            $documentProperty = $property;
            if ($annotation->name) {
                $property = $annotation->name;
            }
            if (property_exists($object, $property)) {
                $value = $this->hydrateValue($object->{$property}, $annotation);
                $metadata->setDocumentValue($document, $documentProperty, $value);
            }
        }
        if ($document instanceof Proxy) {
            $document->__setInitialized(true);
        }
        return $document;
    }