Question

I'm new to zend framework and its my first question I asked in the internet... sorry for my bad english! I have got a problem and in some hours I would jump out of the window ;) I have one controller A, then I need 4 other controllers (B, C,D,E) to call their models and give the answer to the controller A. Controller A send it after this to the view.

Zend_Framework sadly doesn't allow something like this:

Class Arcticle_SteuerController {
    public function showAction() {
    .....
          $text = new Article_TextController();
          $opt = new Article_OptionController();
          $dates =  new Article_DatesController();

          $varText = $text->showTextAction();
          $varOpt = $opt->showOptAction();

          $this->view->varText;
          $this->view->varOpt;
            ....
    ....
    }
}

I have got a problem to put everything in one Controller, because every Controller has its own model and this is wrong designing I think so. So I want to try to call another function from another class.

I find something, that not every Action needs a view... like this:

$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($this->view)
             ->setNoController(true);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);

The problem is that _forward only call the function after the current function. Can anybody help me? Is there a chance, or do I have to put everything in one Controller?

Hope and thanks for help

Best regards Tom

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top