-- Matthew Ratzloff <[EMAIL PROTECTED]> wrote
(on Thursday, 31 May 2007, 10:50 AM -0700):
> Seems like there is a lot of negative phrasing in the front controller 
> parameters (or: not a lot of non-negative phrasing).  Wouldn't it be better 
> if they were framed as positives with default true values instead? 
> Something like:
> 
>    $front->setParam('bufferOutput', false);
>    $front->setParam('enableOutputBuffering', false);
> 
> Or at least use consistent naming.  There's now "disableOutputBuffering" 
> along with "noViewRenderer" and "noErrorHandler".

I considered the positive framing. However, it's easier to set *no*
parameters by default, and selectively turn things on, than it is to
start with parameters; thus, if something is enabled by default, the way
to switch it off is to pass a true value to a switch that disables it.
(Consider the resetInstance() method, which I have to use in each test
that interfaces with the front controller...  right now, it's relatively
spare, but consider needing to populate arrays -- and then there's also
new features, and having to remember to add the new switch to that array
as well... It gets messy.) 

I'd be interested in renaming these to use positive framing and to have
consistent behaviour. However, at this point, being so close to a
release, I don't want to break the current functionality, and I'm also
not keen on having redundant settings or code to eliminate redundant
settings. There's been enough confusion as it is with the ErrorHandler
and ViewRenderer.

> Finally, there seem to be quite a few of these parameters, and you can't 
> exactly glance at the front controller class to find them all.  Shouldn't 
> the manual have a complete listing of all possible parameters and what they 
> do?

Actually, there is:

    http://framework.zend.com/manual/zend.controller.front.html -

section 7.3.4, towards the end. There are only four total settings like
this: useDefaultControllerAlways, disableOutputBuffering,
noErrorHandler, and noViewRenderer -- not a lot, really.  However, the
manual is out of date -- I need to add noErrorHandler and
noViewRenderer. I'll make a note to add these for the next release.


> ----- Original Message ----- 
> From: "Matthew Weier O'Phinney" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Thursday, May 31, 2007 8:52 AM
> Subject: Re: FW: [fw-general] ViewRenderer Problems
> 
> 
> >So, we introduced a minor BC change. Yes, minor; all you need to do to
> >disable the ViewRenderer is to add this to your bootstrap:
> >
> >   // where $front is a front controller instance:
> >   $front->setParam('noViewRenderer', true); 
> 

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to