-- Ralf Kramer <[EMAIL PROTECTED]> wrote
(on Wednesday, 24 October 2007, 02:10 AM +0200):
> Am Montag, den 22.10.2007, 04:14 -0400 schrieb Matthew Weier O'Phinney:
> > it's because _forward() is a protected method in
> > Zend_Controller_Action; you can't call it from a public instance of the
> > object.
>
> There are certainly good reasons to make _forward final and protected
> and _redirect protected. Thus, I decided to create my own class
> Quasda_Controller_Action_Helper_Abstract extends
> Zend_Controller_Action_Helper_Abstract
> {
>
> which implements _forward and _redirect and acts a base class for all my
> future action helpers. The implementation of these methods is in case of
> _forward identically to the implementation in Zend_Controller_Action and
> in case of _redirect I needed to use
> Zend_Controller_Action_HelperBroker::getStaticHelper('Redirector');
> to gain access to the redirector.
>
> This works fine so far, what only bothers me, is that I have doubled
> code in my application. A violation to the DRY convention. Isn't it a
> desirable target to have access to regular "Action" methods in "Action"
> helpers?
I'd have to agree with you here, actually. I inherited the MVC a little
over a year ago, and _forward() and _redirect() were already protected.
My feeling is that they should likely be public, and I may make that
change for a future release (having _forward() and _redirect() proxy to
them while throwing a warning indicating deprecation).
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/