我的行为中需要调用者模型来查找和保存数据。 我该怎么做呢。 p>
class MyBehavior extends Behavior {
public function func(){
$ entities = $ this-> find() - &gt ; all();
}
code> pre>
div>
I need caller model in my behavior to find and save data. How can I do something like this.
class MyBehavior extends Behavior {
public function func() {
$entities = $this->find()->all();
}
我的行为中需要调用者模型来查找和保存数据。 我该怎么做呢。 p>
class MyBehavior extends Behavior {
public function func(){
$ entities = $ this-> find() - &gt ; all();
}
code> pre>
div>