Hall of Famer Posted May 23, 2012 Share Posted May 23, 2012 Well I read this thread on adobe about global variables in class methods, and someone said this: I dont use glabal vars anymore, more like a global class in the form of a Model that I inject into views (via presenters) using Swiz Thread: http://forums.adobe.com/message/4379224 I was wondering how this is possible, it seems that the user has a MVC framework. I've heard of models, views, controllers and how they interact, but the concepts are still confusing to me. Can anyone of you show me an example of how a global class in the form of model can be injected into views? This can help me understand it better, and Id appreciate it very much. Quote Link to comment https://forums.phpfreaks.com/topic/262961-global-class-as-model-injected-into-views-via-presenters/ Share on other sites More sharing options...
creata.physics Posted May 23, 2012 Share Posted May 23, 2012 I don't think it would be considered a model. I believe what you're looking for is a registry. Zend Framework uses it, I believe the Symphony framework also uses it too but I'm not sure. Google search 'registry class php' and you'll get the answers you're looking for, I'm sure. Quote Link to comment https://forums.phpfreaks.com/topic/262961-global-class-as-model-injected-into-views-via-presenters/#findComment-1347845 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.