89 if (!$this->dataMapper) {
90 $this->dataMapper = $this->objectManager->get(DataMapper::class);
104 if ($this->parentObject instanceof AbstractDomainObject
105 && $this->parentObject->_getProperty($this->propertyName) instanceof LazyLoadingProxy
108 $objects = $this->dataMapper->fetchRelated($this->parentObject, $this->propertyName, $this->fieldValue,
false);
109 $propertyValue = $this->dataMapper->mapResultToPropertyValue($this->parentObject, $this->propertyName, $objects);
110 $this->parentObject->_setProperty($this->propertyName, $propertyValue);
111 $this->parentObject->_memorizeCleanState($this->propertyName);
112 return $propertyValue;
114 return $this->parentObject->_getProperty($this->propertyName);
122 $type = $this->dataMapper->getType(get_class($this->parentObject), $this->propertyName);
133 public function __call($methodName, $arguments)
136 if (!is_object($realInstance)) {
139 return call_user_func_array([$realInstance, $methodName], $arguments);
160 public function __set($propertyName, $value)
162 $realInstance = $this->_loadRealInstance();
163 $realInstance->{$propertyName} = $value;
172 public function __isset($propertyName)
174 $realInstance = $this->_loadRealInstance();
175 return isset($realInstance->{$propertyName});
183 public function __unset($propertyName)
185 $realInstance = $this->_loadRealInstance();
186 unset($realInstance->{$propertyName});
194 public function __toString()
196 $realInstance = $this->_loadRealInstance();
197 return $realInstance->__toString();
205 public function current()
207 $realInstance = $this->_loadRealInstance();
208 return current($realInstance);
216 public function key()
218 $realInstance = $this->_loadRealInstance();
219 return key($realInstance);
225 public function next()
227 $realInstance = $this->_loadRealInstance();
234 public function rewind()
236 $realInstance = $this->_loadRealInstance();
237 reset($realInstance);
245 public function valid()
247 return $this->current() !==
false;