I am modifying existing functional code that relied on CActiveRecord. I am now connecting to sybase, which has no schema driver, so I am rewriting with CModel instead of CActiveRecord. My problem may be that I don't understand this general OOP concept?
Original: MyModelController.php
MyModel::model()->scenario='case1';
referring to ::model()
no longer works...because I believe this method only works when the base class is CActiveRecord.
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return ClientProg the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
How can I set the scenario attribute for MyModel now that it is based off of CModel, in the same fashion as I did when the base class was CActiveRecord?