I have an object named $obj. I have overridden the __call
function for that class, so that when I call $obj->setVariableName($value)
then this happens: $obj->variableName = $value
. I don't know when and how exactly $obj->setVariableName($value)
is called in the project. So, during running the application this happens:
setVariable1($value) : works!
setVariable2($value) : works!
setVariable3($value) : It won't trigger __call()
setVariable4($value) : works!
And when I write the extra function setVariable3
, then it works. I don't know how setVariable3
is called, whether it is called directly by $obj->setVariable3
or it is called with a function like call_user_func_array
.
What the problem might be that __call
is not working for setVariable3
?
Update: Now I know that setVariable3
is called from a $form->bind($user)
and running $user->setVariable3('foo')
works. (This is a ZF2+Doctrine project)