Jump to content

How does ZF work? View objects...


ajlisowski

Recommended Posts

This is more a general MVC question in regards to how ZF actually works.

 

How does the view object render the phtml files? Like, lets say one was building their own framework.

 

You have a controller object which has a view object as a member. That view object would call index.phtml which would be able to access $this-> to have access to the view object.

 

But how does the code in that phtml file get rendered? How does the view object call that file and manage to output its contents. Does the object simply include the file?

 

How can the controller pass variables to the view class for use? Like, if I were to say $this->view->obj=$this->obj, and my view class doesnt have a obj object, I will get the error:

 

Undefined property: basic_view::$obj

 

How does ZF do the things it does?

Link to comment
https://forums.phpfreaks.com/topic/204736-how-does-zf-work-view-objects/
Share on other sites

I constantly see your name answering my questions, I'll buy you a coke some day.

 

It better be good Colombian one ;)

 

My sinuses are already screwed due to all the drug-abuse ;):P What are the chances you'll ever really do that? Buy me a book and ship it to me, so that I can help you even better in the future :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.