Welcome Guest, Not a member yet? Register   Sign In
[EASY] Best practice for this (MVC)
#4

[eluser]boltsabre[/eluser]
Quote:So I should create a helper?
No idea, as I said, it really depends on what you're trying to do. If it's just a function then fine, but if you need to create a class/object then you should do it in a library.
Yes, you can load libraries/models/etc in helpers (and in your own libraries).
But you cannot use $this, it has to be $CI... just google "codeigniter how to load a library in a helper" for more details.


Messages In This Thread
[EASY] Best practice for this (MVC) - by El Forum - 01-22-2013, 05:22 AM
[EASY] Best practice for this (MVC) - by El Forum - 01-22-2013, 05:41 AM
[EASY] Best practice for this (MVC) - by El Forum - 01-22-2013, 07:07 AM
[EASY] Best practice for this (MVC) - by El Forum - 01-22-2013, 07:27 AM
[EASY] Best practice for this (MVC) - by El Forum - 01-22-2013, 07:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB