Tuesday, January 27, 2009

Re: What is the advised way to call a function from another controller?

What about making the method static?

Otherwise you can just instantiate the object, and use its methods.

On Jan 27, 8:59 am, leo <ponton....@gmail.com> wrote:
> On Jan 27, 3:26 pm, RichardAtHome <richardath...@gmail.com> wrote:
>
> > or you could put the function in your AppController
>
> Surely then you would either have non-generic methods relating to
> models that don't exist at that point or models included unnecessarily
> in all controllers?
--~--~---------~--~----~------------~-------~--~----~
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: