Hi Folks,
I want over-ride the save function of CActiveRecord like this way,
So I will do change on attributes before saving, .. in this way I am keeping, my business in model.
But, when I do error_reporting(-1).. means all errors are shown, I am getting the error message as,
I want over-ride the save function of CActiveRecord like this way,
public function save() { try { /***do calculations on attributes here ***/ return parent::save(); } catch (Exception $exception) { echo $exception->getMessage(); return false; } }
So I will do change on attributes before saving, .. in this way I am keeping, my business in model.
But, when I do error_reporting(-1).. means all errors are shown, I am getting the error message as,
Declaration of modelname::save() should be compatible with that of CActiveRecord::save()