• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where to put plain object classes?

#23
Yes sorry for the kvetching and moaning. The autoloader question does relate to the 'where do I put stuff' question. One could easily suffer problems if a) lots of require statements start appearing in one's code or b) the autoloader function is scanning too many directories for every class it tries to instantiate.

I'm still a little puzzled by the first responses in this thread:
Rufnex Wrote:You have to put it into /application/library because its your own class.
dmyers Wrote:Rufnex is correct, just as a side note thou:
You would of course use $this->load->library('PlainObject'); to load this class and of course this would automatically attach it to the CI super object as a singleton. $this->plainobject->method(); etc...

Such certitude in that statement! Does this mean I'm never supposed to put my own classes in Model? I have a MY_data_object class that all my db classes inherit from which prevents me from having to write fetch/update/insert/delete functions for every single model class I have. That is my own class but seems like a very good candidate for the model directory.
Reply


Messages In This Thread
Where to put plain object classes? - by geekita - 12-02-2014, 05:51 AM
RE: Where to put plain object classes? - by sneakyimp - 12-28-2014, 07:35 PM
RE: Where to put plain object classes? - by Jamie - 01-06-2015, 05:18 AM
RE: Where to put plain object classes? - by Jamie - 01-06-2015, 03:08 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.