With traditional OOP, I would (or could) create a model / object that represents User , with properties that reflect this, i.e. name , id , job title , etc.
Then I could create a new instance of this object and assign it to a variable, and if I iterate over the result set, I could create an instance for each of them. With codeigniter, this seems impossible, because:
$this->load->model('User');
Creates it and puts it for use in $this->user .
Is there no way to use models as objects in a more traditional way ?, but without breaking into the CI way to do something?
I understand that you can assign things to another object name using $this->load->model('User', 'fubar') , but not as dynamic as just assigning an instance to a variable.
Any understanding of this issue is much appreciated by the guys.
EDIT: thanks for the answers guys, I think I skipped the vital part of working on the βCodigniter Wayβ, but I just looked through the library and practice using the same instance (assigned to the codeigniter namespace), but clearing the instance variables after each use seems to be a great way to work that removes my reservations.
Once again - thanks for the help and answers.