Welcome Guest, Not a member yet? Register   Sign In
Calling functions within controller

Basically I want to make some functions I would use a lot on different pages, that I can call from any controller rather than copying and pasting the code.

Where should I place these? In the My_Controller? Or should I make some kind of plugin/library?

Looking ahead at 2.0, I would ask whether the functions are related in a way that a Library would make sense. If so, do that. If not, a Helper would be the way to go. The ambiguous "Plugin" structure itself won't be supported from 2.0 onward, so at this point no new plugins (as such) should be created.

Libraries and Helpers are where it's at in the new world! Smile

Alright thanks, I'll see about making a library I guess.

Theme © iAndrew 2016 - Forum software by © MyBB