public function set($entity, $property, $value = null) { if (is_array($property)) { foreach ($property as $key => $value) { $this->set($entity, $key, $value); } } else { $value = $this->toPhpValue($value, $this->entityConfig->getProperty($property)->getType()); $this->_set($entity, $property, $value); } return $this; }
public function set($entity, $property, $value = null) { if (is_array($property)) { foreach ($this->entityConfig->getProperties() as $prop) { $this->set($entity, $prop->getName(), $property[$prop->getName()]); } } else { $value = $this->toPhpValue($value, $this->entityConfig->getProperty($property)->getType()); $this->_set($entity, $property, $value); } return $this; }