Revision #4 was created by Bogsey on Feb 19, 2013, 4:23:32 PM.
Changed override methods to beforeSave() and instantiate
Content
[...]
*/
public static function model($className = __CLASS__) {
return parent::model($className);
}
/** * Overrides the ActiveRecord save to insert the extra parameters
* This class has into JSON text and save it in the data baseSaves meta data in the params attribute
* @return boolean
*/
public function save($runValidation = true, $attributes = nullbeforeSave() {
$this->name = get_class($this);
$vars = get_object_vars($this);
[...]
}
/** * Overrides the ActiveRecord function to read the extra params andCreates the correct class type and populates the meta data
* create a new class based on the data and return the sub class@param array $attributes
* @return CActiveRecord
*/
public function findByPk($pk, $condition = '', $params = array()) {