コード例 #1
0
 /**
  * atualizar objeto
  */
 public function update()
 {
     if ($_POST["params"]["id"] == null) {
         Lib::returnError('c4');
     } else {
         $this->save();
     }
 }
コード例 #2
0
ファイル: Main.php プロジェクト: dnielrodrigues/cristal
 /**
  * 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");
     }
 }