Wednesday, March 25, 2009

requestAction and parameters

Hi,

I have a doubt with requestAction and passing parameters to the
action. The cookbook doesn't state it clear enough for me.

If you have a controller action like this:

function recent($count = null) {...}

and you call it using requestAction with a parameter...

$this->requestAction(array('action' => 'recent', 5));

then you don't get 5 in the $count variable in the action. You can
find in $this->params[0].

Is this the expected behavior?

TIA
---
Fran Iglesias <cakephpilia@gmail.com>
http://cakephpilia.blogspot.com


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

No comments: