Creating an object with new vs $this
I have recently been working on a project that was thrown upon me at work
after another developer left (he was the only one working on it prior to
leaving). The project was written in CodeIgniter and uses the MVC
framework. While working on the project I noticed something funny or at
least something I have not seen before. After the model is loaded into the
controller the object is passed into the view using...
$data['outcomes'] = $this->id_conversion;
With id_conversion being the model that was loaded in at the top of the
controller. My question is is this any different then using
new Id_conversion();
in place of the above.
Thanks for any help or anyone able to point me in the correct direction.
No comments:
Post a Comment