What is best practice for creating php mvc app. I am asp.net developer where controller linked with view .But I saw in php mvc tutorial that view has two data member of controller and model type. View is used to call a propitiate controller with controller type of object and model. view has information about both controller and model where controller only knew about model.
class model{ //code.. } class controller{ priavate $model;//model type object //code.. } class view{ private $model;//model type of object private $controller//controller type of object //code.. } But in asp.net mvc controller decide which view to call when certain event occur . Controller information about both model and view. view can have model type of object only.which in php will as follow
class model{ //code.. } class controller{ private $model;//model type object private view;/view type object //code.. } class view{ private $model;//model type of object //code.. } Which one is best approach in php to create view type of object in controller or controller type of object in view.
Thanks a lot!