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

[eluser]Starovich[/eluser]
[quote author="mikelexp" date="1299421299"]Models maybe?

$this->load->model("dog");
$this->dog->getName();[/quote]

This doesn't work because I can only access static methods using that approach. For example, how would I create another Dog object if I wanted two of them?
ie:
Code:
$myDog = new Dog('Fido');
$anotherDog = new Dog('Digby');


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



Theme © iAndrew 2016 - Forum software by © MyBB