运行我的模型类时出现未定义变量错误:
.*
有没有办法在函数中读取accountTypeFlag?
答案 0 :(得分:0)
public $accountTypeFlag;
...
public function getSecondType() {
if ($this->accountTypeFlag == 1) {
...
} elseif ($this->accountTypeFlag == 2) {
...
} elseif ($this->accountTypeFlag == 3) {
...
}
}