$value) { if (property_exists($this, $key)) { $this->$key = $value; } else { throw new \Exception("Entitiy has no property ".$key); } } return true; } }