/** * atualizar objeto */ public function update() { if ($_POST["params"]["id"] == null) { Lib::returnError('c4'); } else { $this->save(); } }
/** * get Geral */ public function get($field) { $fillable = false; foreach ($this->fillable as $item => $type) { if ($field == $item) { $fillable = true; } } if ($fillable) { return $this->{$field}; } else { Lib::returnError("c5"); } }