public function setValues($data = [], $blockedKeys = []) { foreach ($data as $key => $value) { if (!in_array($key, $blockedKeys)) { $method = "set" . $key; if (method_exists($this, $method)) { $this->{$method}($value); } } } return $this; }