Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 451589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:59:02+00:00 2026-05-12T21:59:02+00:00

I’m trying to access the final xhtml output right before it’s sent to the

  • 0

I’m trying to access the final xhtml output right before it’s sent to the browser as a string. The postDispatch() methods of the actions and plugins seem to be too early to do this. When I step through Zend_Controller_Front::dispatch() method using a debugger, I can access the desired output as a string right before $this->_response->sendResponse() is called at the very end by adding a watch expression $this->getResponse()->getBody(). However, there seems to be no dedicated hook to tap into right there. I need the final response body as a string in order to send it to Prince XML to generate a pdf. Does anybody know an elegant way to do this?

Thanks, Adrian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T21:59:02+00:00Added an answer on May 12, 2026 at 9:59 pm

    The Zend_Controller_Front plugin hooks are the following (from here):

    • routeStartup() is called before Zend_Controller_Front calls on the router to evaluate the request against the registered routes.
    • routeShutdown() is called after the router finishes routing the request.
    • dispatchLoopStartup() is called before Zend_Controller_Front enters its dispatch loop.
    • preDispatch() is called before an action is dispatched by the dispatcher. This callback allows for proxy or filter behavior. By altering the request and resetting its dispatched flag (via Zend_Controller_Request_Abstract::setDispatched(false)), the current action may be skipped and/or replaced.
    • postDispatch() is called after an action is dispatched by the dispatcher. This callback allows for proxy or filter behavior. By altering the request and resetting its dispatched flag (via Zend_Controller_Request_Abstract::setDispatched(false)), a new action may be specified for dispatching.
    • dispatchLoopShutdown() is called after Zend_Controller_Front exits its dispatch loop.

    So dispatchLoopShutdown() is your hook to go – it’s the last thing Zend_Controller_Front::dispatch() does before returning or sending the response.

    Another option could be, even though they were designed for something completely different, to use Zend_View filters. These filters can be added to the Zend_View-instance and are called in Zend_View::render(). A filter is simply an instance of a class that provides a filter($buffer)-method that returns the filtered $buffer. But using this interface for something not related to filtering the ouptut, seems not to be the correct way actually.

    I personally think, that a dispatchLoopShutdown()-plugin will be the way to go.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I am trying to loop through a bunch of documents I have to put
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
i want to parse a xhtml file and display in UITableView. what is the
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.