Helpers are not "controller functions". Firstly, Helpers are classes, not functions. But in any case they do not belong to the controller, they belong to the view. The controller instructs the view which helpers to load, but the view does the actual loading, and could ignore / override the "suggestions" of the controller [although the current view classes don't].
In fact, getting access to a View's helpers from a controller method would be quite tricky. You'd have to call a manual render(), which would create the view object then call its own render() method, which would in turn call its _render() method which loads the helpers. From there, you'd have to retrieve the view object from the class registry, then... *sigh* who cares? It would be complicated because you're not supposed to do it. And you should have no reason to. On Dec 19, 9:49 am, jon <[EMAIL PROTECTED]> wrote: > On Dec 17, 9:21 am, MrTufty <[EMAIL PROTECTED]> wrote: > > > It looks like you haven't really studied the whole MVC, separation of > > concerns thing. You shouldn't be callingfunctionsin the model from > > theview. You shouldn't even be calling controller functions from the view. > > So how do helpers fit into that? They're functions, yet are called > from the view are they not? > Or do they not count as controller functions? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
