public function loadProperty($object, $propertyName)
    {
        if (get_class($object) !== $this->objectClass) {
            throw new \LogicException(sprintf('Invalid object type. Expected "%s" but got "%s".', $this->objectClass, get_class($object)));
        }

        if ($this->objectManager->isPropertyLoaded($object, $propertyName)) {
            return;
        }

        $hydrator = $this->objectManager->getHydratorFor($this->objectClass);
        $hydrator->loadProperty($object, $propertyName);
    }
public function loadProperty($object, $propertyName)
    {
        if (get_class($object) !== $this->objectClass) {
            throw new \LogicException(sprintf('Invalid object type. Expected "%s" but got "%s".', $this->objectClass, get_class($object)));
        }

        if ($this->objectManager->isPropertyLoaded($object, $propertyName)) {
            return;
        }

        $hydrator = $this->objectManager->getHydratorFor($this->objectClass);
        $hydrator->loadProperty($object, $propertyName);
    }
public function loadProperty ( $ object , $ propertyName ) { if ( get_class ( $ object ) !== $ this -> objectClass ) { throw new \ LogicException ( sprintf ( 'Invalid object type. Expected "%s" but got "%s".' , $ this -> objectClass , get_class ( $ object ) ) ) ; } if ( $ this -> objectManager -> isPropertyLoaded ( $ object , $ propertyName ) ) { return ; } $ hydrator = $ this -> objectManager -> getHydratorFor ( $ this -> objectClass ) ; $ hydrator -> loadProperty ( $ object , $ propertyName ) ; }
Load an object property.
This property can be loaded only if needed for performance reason.

@param array $object The object for wich we have to load property
@param array $propertyName The property to load
Load an object property . This property can be loaded only if needed for performance reason .