Welcome Guest, Not a member yet? Register   Sign In
Librarys
#1

[eluser]seminalJim[/eluser]
What are librarys for, and how do they differ from models and helpers.

I just need to know to keep my code in the right place because as my site becomes more complex im getting confused where to put stuff... eg, im trying to be more modular with my code.

Only difference i know is that helpers are global in controllers and views.

Just to be clear, what are all the differences?

thnks
#2

[eluser]CroNiX[/eluser]
A library is something, like a helper, that can be used globally throughout the application. A helper is a procedural php function that usually only handles a single task. A library is a class that has can have many methods to carry out multiple related tasks. Take a look in the user guide and check out some of the libraries available to CI for a better idea. They are reusable generic components. Like the image library resizes, thumbnails, overlays text, etc. All image-related utility functions that interact with each other.




Theme © iAndrew 2016 - Forum software by © MyBB