Avoiding massive controller: where to put individual files |
(12-28-2014, 12:23 PM)sneakyimp Wrote:(12-27-2014, 07:33 PM)includebeer Wrote: core is to extend or replace core libraries. I should have say "core classes". CodeIgniter's core classes are in system/core http://www.codeigniter.com/user_guide/ge...asses.html Quote:I've heard that model files may do more than just deal directly with a database. Do helpers contain ONLY functions? Might they not contain classes? That's the way CodeIgniter's is structured. Nothing prevents you from putting whatever you want in those files. In my models I also have functions that do other stuff than database operations. Like data validation, for example. Stuff related to the database model. I suggest you read the User Guide to learn the basics of CI : "Models are PHP classes that are designed to work with information in your database. For example, let's say you use CodeIgniter to manage a blog. You might have a model class that contains functions to insert, update, and retrieve your blog data." http://www.codeigniter.com/user_guide/ge...odels.html "Helpers, as the name suggests, help you with tasks. Each helper file is simply a collection of functions in a particular category. " http://www.codeigniter.com/user_guide/ge...lpers.html |
Welcome Guest, Not a member yet? Register Sign In |