4
在組件我嘗試訪問我的資料型號
class SignMeupComponent extends Object
public function register() {
$this->__isLoggedIn();
if (!empty($this->controller->data)) {
extract($this->settings);
$model = $this->controller->modelClass;
$this->controller->loadModel($model);
$this->controller->{$model}->Myprofile->save($this->controller->data);
$this->controller->data['Myprofile']['user_id'] = $this->controller->{$model}->id;
$this->controller->{$model}->set($this->controller->data);
if ($this->controller->{$model}->validates()) {
- 如何使用$這 - >控制器 - > modelclass
- 如何使用任何模型組件
感謝任何建議
好的,謝謝約翰我是新手 現在我明白了統治 – krissanawat 2011-05-13 07:27:37