[eluser]Bramme[/eluser]
Hi guys
Just a semantics question for you:
I am working on some libraries/a little cms for personal use (that will take care of some basic CRUD things etc). So I'll be writing a set of functions that deal with database interaction, one of these functions, for example, will be the get_pages() function, that will return a list of all the pages a user has added to a site.
But now I'm a little lost on MVC/CI semantics. Where should I put this function?
- MVC: it's database interaction, put it in a model.
- CI: It's part of the Pages library, so I should put it in the library class.
- A combination? Make it a library function and call a model in the library?
How do you guys handle this when working on things?