MVC and Objects |
[eluser]Jareish[/eluser]
Thank you for your reply, I'm gonna look intoo this (i found a nice tut @ http://net.tutsplus.com/tutorials/php/hv...plication/) Atm I 'solved' it by calling creating the class in the model. require 'libaries/Project.class.php'; and later in the get_project method of the projects_model I create a new project() and load it up, and return it to the controller. Main benefit about this is, that I can create a hierarchy in the object, which would be hard or hard to read through the default method ($data['projects'][0]['pages']['0']['title'] etc...) Instead I can do In the view: $defaultpage = $project->get_page(0); echo $defaultpage->title; |
Messages In This Thread |
MVC and Objects - by El Forum - 05-03-2011, 07:21 AM
MVC and Objects - by El Forum - 05-06-2011, 05:25 AM
MVC and Objects - by El Forum - 05-06-2011, 05:41 AM
|