Hi
first, I would like to thank you for your efforts...
I want catch non existing property of a model in my behavior.
I trid it:
(in my behavior:)
public function __get($name) {
return 'Handle '.$name.' By behavior.';
}
when call $model->nonexist
, I get Unknown Property exception.
I changed it to :
public function getNonexist() {
return 'Handle nonexist By behavior.';
}
It worked, but I want handle dynamic property,( for example Based on behavior config ...).
too, I also checked __call for non exiting owner method , but not worked.
Is it a bug , or is there another way?
write __isset function
__isset not worked too.
Its not bug. You must implement/override canGetProperty()
.
Most helpful comment
Its not bug. You must implement/override
canGetProperty()
.