reference parameters in behaviour functions - references not working?
Hi guys, I'm not sure if I am doing something wrong, or if this is a
bug caused by the magic of a the instance of a model getting inserted
into underlying behaviour calls..
I'd rather not post real code on here, but have included a specific
enough example to try to re-enact the problem.
basically, I have a behaviour with a function
function behaviourFunction(&$i_Model, &$o_SomeDataOut)
{
$o_SomeDataOut = 'Data From behaviourFunction';
return true;
}
now, if I have a model that is correctly setup to utilise the
behaviour
(in my code this is all confirmed as working - the behaviour setup
function gets called correctly etc)
if I do
$someData = 'pre behaciour function call';
MyModel->behaviourFunction($someData);
debug($someData);
the function is getting called and executed, (debugging confirms that
the correct model information is getting passed magically to the first
parameter in the behaviourFunction) but now it seems, the variable
that is being passed into the behaviourFunction as reference is not
working, i.e maybe somewhere in the process of
re dispatching the call with the model parameter automagically
injected, the reference status of my parameter is being messed up.
Any thoughts?
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home