Re: [fw-general] Is there a way to disable "echo", "print" inside a method
thank you guys.. lets c wat can be done.. at the moment the best way i can see is through education... i hope that doesn't end up bring a guerrilla :-)
Re: [fw-general] Is there a way to disable "echo", "print" inside a method
Matthew Weier O'Phinney wrote: Well, for many releases now, we've had the dispatcher wrapping the dispatched action with output buffering, so it's all being trapped in the response object already. It's not a good practice, however, to echo directly and rely on this. Probably the best way to get them out of the habit is through education. Stick an echo into a library somewhere that you know they'll use, and see if they can figure out what happened -- and then point out why what they're doing is no better. Now that's what I call geurila programming! :p Shaun
Re: [fw-general] Is there a way to disable "echo", "print" inside a method
-- Jakub Podhorský <[EMAIL PROTECTED]> wrote (on Tuesday, 12 June 2007, 07:11 PM +0200): > What about to start output buffering in preDispatch method and in postDispatch > method clear this output and if there is any output in postDispatch you can > log > it with controller and action name Ouput buffering is already used in the dispatcher to capture content echo'd by the action and its constituents, so the only way to enforce this would be to turn off output buffering ($front->setParam('disableOutputBuffer')), and then write your own plugins. > ━━━ > > From: depace [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 12, 2007 6:22 PM > To: fw-general@lists.zend.com > Subject: [fw-general] Is there a way to disable "echo", "print" inside a > method > > > > This sounds little stupid but if it is possible then it will save my ass being > skinned.. > > the problem is while working in a team... the programmers instead of > displaying > the data through template they have a habit of echoing from the method > itself... > have to trace where are all those crazy echosss . > so it has been a lil pain in ass ... > > it really is a pain to make people work in MVC .. dunno why is it so hard for > people to understand it.. > > -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
RE: [fw-general] Is there a way to disable "echo", "print" inside a method
What about to start output buffering in preDispatch method and in postDispatch method clear this output and if there is any output in postDispatch you can log it with controller and action name _ From: depace [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 12, 2007 6:22 PM To: fw-general@lists.zend.com Subject: [fw-general] Is there a way to disable "echo", "print" inside a method This sounds little stupid but if it is possible then it will save my ass being skinned.. the problem is while working in a team... the programmers instead of displaying the data through template they have a habit of echoing from the method itself... have to trace where are all those crazy echosss . so it has been a lil pain in ass ... it really is a pain to make people work in MVC .. dunno why is it so hard for people to understand it..
Re: [fw-general] Is there a way to disable "echo", "print" inside a method
-- depace <[EMAIL PROTECTED]> wrote (on Tuesday, 12 June 2007, 09:52 PM +0530): > This sounds little stupid but if it is possible then it will save my ass being > skinned.. > > the problem is while working in a team... the programmers instead of > displaying > the data through template they have a habit of echoing from the method > itself... > have to trace where are all those crazy echosss . > so it has been a lil pain in ass ... > it really is a pain to make people work in MVC .. dunno why is it so hard for > people to understand it.. Well, for many releases now, we've had the dispatcher wrapping the dispatched action with output buffering, so it's all being trapped in the response object already. It's not a good practice, however, to echo directly and rely on this. Probably the best way to get them out of the habit is through education. Stick an echo into a library somewhere that you know they'll use, and see if they can figure out what happened -- and then point out why what they're doing is no better. -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
Re: [fw-general] Is there a way to disable "echo", "print" inside a method
depace wrote: This sounds little stupid but if it is possible then it will save my ass being skinned.. the problem is while working in a team... the programmers instead of displaying the data through template they have a habit of echoing from the method itself... have to trace where are all those crazy echosss . so it has been a lil pain in ass ... it really is a pain to make people work in MVC .. dunno why is it so hard for people to understand it.. Dude, tell them to stop doing that, there is no need! If they really wanna see something get them to log it with Zend_Log. No need for you to bend over backwards to accommodate them. Go teach them the ways of changes. If they're not willing to compromise, there's point going down the MVC route...well there is but it'll be more painful than necessary. Shaun
Re: [fw-general] Is there a way to disable "echo", "print" inside a method
On 6/12/07, depace <[EMAIL PROTECTED]> wrote: This sounds little stupid but if it is possible then it will save my ass being skinned.. the problem is while working in a team... the programmers instead of displaying the data through template they have a habit of echoing from the method itself... have to trace where are all those crazy echosss . so it has been a lil pain in ass ... it really is a pain to make people work in MVC .. dunno why is it so hard for people to understand it.. :D That sounds whack, but did you try if disabled_functions (or something like that) works on a per directory basis? Till
Re: [fw-general] Is there a way to disable "echo", "print" inside a method
the problem is while working in a team... the programmers instead of displaying the data through template they have a habit of echoing from the method itself... have to trace where are all those crazy echosss . so it has been a lil pain in ass ... You can't really disable echo/print but you could set output buffering so you capture everything echo'ed/print'ed and then you can decide what to do with it. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/