Welcome Guest, Not a member yet? Register   Sign In
PHP objects
#1

[eluser]ndriana[/eluser]
Hi,

I am fairly new to MVC and ci in general. I don't understand why the view can change a model object. I think that it is logical that View is just the place where the templates are located.

But when I create a model object, say the header of the page (logo, horizontal nav, selected menu...) in the Controller, I(or the webdesigner) can change it when it is passed to View. Googling told that since PHP5, when you pass an object, it is always by reference.

But if it is changed in the view, my whole buisness logic in my Controller can be corrupted.

Namespace sounds a solution but I don't know how to do it.


Messages In This Thread
PHP objects - by El Forum - 09-22-2012, 03:53 PM
PHP objects - by El Forum - 09-22-2012, 04:28 PM
PHP objects - by El Forum - 09-22-2012, 04:37 PM
PHP objects - by El Forum - 09-22-2012, 05:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB