Good point.. As far as I know, the key difference is:

$this->functionName() is used to call another function that ought to return a 
value back to the calling function.
$this->setAction() effectively terminates the calling action and starts the 
called action, which then (probably) renders a view.

Or at least that's how I use them.

Jeremy Burns
[email protected]
(Skype) +44 208 123 3822 (jeremy_burns)
(m) +44 7973 481949
(h) +44 208 530 7573

On 26 Apr 2010, at 08:00, Miles J wrote:

> Or you can use $this->setAction().
> 
> On Apr 25, 10:54 pm, Jeremy Burns <[email protected]> wrote:
>> $this->functionName();
>> 
>> Jeremy Burns
>> [email protected]
>> 
>> On 25 Apr 2010, at 23:40, Eric Anderson wrote:
>> 
>> 
>> 
>>> Hi everyone,
>> 
>>> I was unable to find the answer to this question in the 1.2.x
>>> documentation or in this group (although I have a feeling it must have
>>> already been answered somewhere).
>> 
>>> How do I properly call another action of the controller inside another
>>> action? All within the same controller. I just need to call one
>>> controller action inside of another. I know it's simple, but I can't
>>> seem to figure it out.
>> 
>>> Thanks!
>> 
>>> Eric
>> 
>>> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected] For more options, visit this group 
>>> athttp://groups.google.com/group/cake-php?hl=en
>> 
>> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 [email protected]
>> To unsubscribe from this group, send email to
>> [email protected] For more options, visit this group 
>> athttp://groups.google.com/group/cake-php?hl=en
> 
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to