比如
class AskAnswer extends CActiveRecord
{
/**
* Returns the static model of the specified AR class.
* @return AskAnswer the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
提示到“AskAnswer::model()->getDbConnection()->”这层就没有了
在5.51中是没问题的,如“AskAnswer::model()->getDbConnection()->createCommand(’’)->query()…”;
把返回类型改为CActiveRecord就可以完美提示如下
class AskAnswer extends CActiveRecord
{
/**
* Returns the static model of the specified AR class.
* @return CActiveRecord the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
692
693