public function addAttributes($arrAttributes) { if (!is_array($arrAttributes)) { return; } foreach ($arrAttributes as $k => $v) { $this->{$k} = $v; } }