Welcome Guest, Not a member yet? Register   Sign In
How do I create object definitions that I can reach from within CI?
#1

[eluser]Starovich[/eluser]
Hello! I have been using CI for a while (MVC approach) but never felt the need for objects until now.

I would need to be able to do something like this from all controllers:

Code:
$myDog = new Dog('Fido');
$myDog->getName();

In my current project I extend Controller with my own MY_Controller and I'd need to use these objects there also.

My question is basically: Where do I put the code for my objects (Dog class definitions etc) to be able to reach them from MY_Controller and controllers/libraries in CI?

Thank you for your time.


Messages In This Thread
How do I create object definitions that I can reach from within CI? - by El Forum - 03-05-2011, 08:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB