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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.