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

  • Home
  • SEARCH
  • 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 8743223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:38:18+00:00 2026-06-13T11:38:18+00:00

I am currently reading Zend Framework 1.8 Web Application Development written by Keith Pope.

  • 0

I am currently reading “Zend Framework 1.8
Web Application Development” written by “Keith Pope”. In that he tells us to use ‘ActionStack’ so that the Controller for the category top-level menu will be called on every request. The source code for the the plugin is :

class SF_Plugin_Action extends Zend_Controller_Plugin_Abstract 
{
    protected $_stack;

    public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) 
    {
      $stack = $this->getStack();

      // category menu
      $categoryRequest = new Zend_Controller_Request_Simple();
      $categoryRequest->setControllerName('category')
                      ->setActionName('index')
                      ->setParam(
                          'responseSegment', 
                          'categoryMain'
                      );

      // push requests into the stack
      $stack->pushStack($categoryRequest);
    }

    public function getStack()
    {
      if (null === $this->_stack) {
        $front = Zend_Controller_Front::getInstance();

        if (!$front->hasPlugin(
          'Zend_Controller_Plugin_ActionStack'
        )) {
           $stack = new Zend_Controller_Plugin_ActionStack();
           $front->registerPlugin($stack);
        } else {
           $stack = $front->getPlugin('ActionStack');
        }

        $this->_stack = $stack;
    }

    return $this->_stack;
  }
}

I have read the code for ‘ActionStack’ plugin. In the ‘postDispatch’ function it saves the current request and then in the ‘forward’ function it changes the current request’s controller, action and also set parameters. Then what will happen to the current request ? How it will be executed ?

Also I heard ActionStack is evil. As I am a newbie I didn’t understand most of it, as he did not explained it(for newbies). Why ActionStack is evil ?

  • 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-06-13T11:38:19+00:00Added an answer on June 13, 2026 at 11:38 am

    It is the answer to my first question. As the action stack will be executed last (in the post dispatch) the current response object will be holding all content that got rendered for the request the user made, and the action stack will append the data to it. Hence the user will get content that he asked for + content that got rendered due to action stack

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

Sidebar

Related Questions

I've got an MVC application written with Zend Framework that pulls data from an
I'm currently working on a build system in Phing that takes a Zend Framework
I am currently reading about SWT. There is often written, that Eclipse as an
I'm working on a large php site that currently does not use any framework.
I'm currently reading Agile Web Development With Rails, 3rd edition. On page 672, I
I'm currently reading Rails 3 In Action. There is code that I was wondering
I'm currently reading the book Pro Asp.Net MVC Framework. In the book, the author
I am currently reading this documentation here where I want to use CRON. Now
I'm currently reading Oreilly's Learning XNA 4.0 and I've noticed that the author is
Zend Framework/Doctrine 2 application.: /app /modules /blog /controllers /BlogController.php /domain /entities /services /PostService.php /repositories

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.