Hi Jörg,

You could likely add such behaviour if you wanted by subclassing the 
Zend_Controller_Action class - actually you do quite a lot of setup tasks using 
subclassing. Since render() is a public method, you can subclass Action and add 
your own version to meet any requirements you wish.

I wouldn't really recommend it for the core class however - there's already a 
View object and while some proxy methods are a welcome addition the more they 
are added to the less the core class starts to look like an independent entity.


 
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com


----- Original Message ----
From: Jörg Sandkuhle <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Thursday, March 22, 2007 10:35:34 AM
Subject: [fw-mvc] Render-method question

Hello!

I have a suggestion to the new Zend_Controller_Action->render() method.
Wouldnt it be nice to pass additional parameter to the render method for 
the view ?

e.g. public function render($action = null, $name = null, $noController 
= false, $params=array()).

So you dont have to instantiate the view in an action befor you can pass 
parameter to it.

<?php
.
public function errorAction() {
   
    $this->initView();
    $this->view->errorMessage = "Login or password is wrong!"
    $this->render();

}
.
?>

Or did i missed something?

Regards Jörg














 
____________________________________________________________________________________
Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
http://farechase.yahoo.com/promo-generic-14795097

Reply via email to