RE: [fw-general] Zend_Filter_Input::getEscaped()
> -Original Message- > From: Shaun Rowe [mailto:[EMAIL PROTECTED] > > Yes, I'd be very interested in writing an article. Are you > referring to my existing solution? Or to my (impending) > refactoring? Or both? :) I was thinking of the refactoring, showing how to manage Zend_Filter_Input rules using Zend_Config. Bill
Re: [fw-general] Zend_Filter_Input::getEscaped()
Bill Karwin wrote: -Original Message- From: Shaun Rowe [mailto:[EMAIL PROTECTED] Now all I have to do is refactor my code a bit to use this component and I'm laughing. As mine is already configured via an xml document, I reckon the config for Zend_Filter_Input can be described a similar way and held in a Zend_Config object. Would anyone be interested in how I get on? That's great! Yes, the idea was to make the rules declared as data, so one could easily store it in one of the Zend_Config back-ends. Would you consider writing an article for DevZone with your solution? They're always looking for good ZF content. Regards, Bill Karwin Yes, I'd be very interested in writing an article. Are you referring to my existing solution? Or to my (impending) refactoring? Or both? :) Cheers Shaun
RE: [fw-general] Zend_Filter_Input::getEscaped()
> -Original Message- > From: Shaun Rowe [mailto:[EMAIL PROTECTED] > > Now all I have to do is refactor my code a bit to use this > component and I'm laughing. As mine is already configured via > an xml document, I reckon the config for Zend_Filter_Input > can be described a similar way and held in a Zend_Config > object. Would anyone be interested in how I get on? That's great! Yes, the idea was to make the rules declared as data, so one could easily store it in one of the Zend_Config back-ends. Would you consider writing an article for DevZone with your solution? They're always looking for good ZF content. Regards, Bill Karwin
Re: [fw-general] Zend_Filter_Input::getEscaped()
Bill Karwin wrote: Zend_Filter_Input is in core now. The purpose of requiring getUnescaped() to be called explicitly is to force the application developer to acknowledge the fact that the value is in a form that is potentially not safe to output. And yes, you can subclass Zend_Filter_Input and redefine its __get() method if you want to. Alternatively, you can set the Zend_Filter_Input escape filter to something else: $input = new Zend_Filter_Input( ... ); $input->setDefaultEscapeFilter('StringTrim'); // for example Regards, Bill Karwin I have to say a big thanks to everyone who has worked on the re-design of Zend_Filter_Input. Having developed something quite similar myself using the ZF I'm pleased to see it now in the core. Now all I have to do is refactor my code a bit to use this component and I'm laughing. As mine is already configured via an xml document, I reckon the config for Zend_Filter_Input can be described a similar way and held in a Zend_Config object. Would anyone be interested in how I get on? Cheers Shaun
RE: [fw-general] Zend_Filter_Input::getEscaped()
Zend_Filter_Input is in core now. The purpose of requiring getUnescaped() to be called explicitly is to force the application developer to acknowledge the fact that the value is in a form that is potentially not safe to output. And yes, you can subclass Zend_Filter_Input and redefine its __get() method if you want to. Alternatively, you can set the Zend_Filter_Input escape filter to something else: $input = new Zend_Filter_Input( ... ); $input->setDefaultEscapeFilter('StringTrim'); // for example Regards, Bill Karwin From: Pádraic Brady [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 1:30 AM To: Jur Jean Cc: Zend Framework General Subject: Re: [fw-general] Zend_Filter_Input::getEscaped() Hi Jur, I have the same preference as yourself. I'm not using the component yet until it either reaches Core or is updated to reflect other potential solutions. But for now you can subclass Zend_Filter_Input and override its __get() method to change the default treatment of values to avoid the automated escaping. A few other options are also available - check the proposal comments over at: http://framework.zend.com/wiki/display/ZFPROP/Zend_Filter_Input+redesign+-+Bill+Karwin Pádraic Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com - Original Message From: Jur Jean <[EMAIL PROTECTED]> To: fw-general@lists.zend.com Sent: Wednesday, May 30, 2007 9:17:49 AM Subject: [fw-general] Zend_Filter_Input::getEscaped() Why is Zend_Filter_Input::getEscaped() called by default when magic accessing vars? I use getUnescaped() a lot more often. In the view, you should use $this->escape(), the form helpers escapes values, and when writing to my database i also don't want to escape using this method, but use the db's escape method. -- View this message in context: http://www.nabble.com/Zend_Filter_Input%3A%3AgetEscaped%28%29-tf3838924s16154.html#a10869449 Sent from the Zend Framework mailing list archive at Nabble.com. Ready for the edge of your seat? Check out tonight's top picks <http://us.rd.yahoo.com/evt=48220/*http://tv.yahoo.com/> on Yahoo! TV.
Re: [fw-general] Zend_Filter_Input::getEscaped()
I'm at least as dumb as everyone else, Bryce. :) Whenever you get around to coding I'll have an svn external pointing at the laboratory to grab the code ;). Look forward to reviewing and testing. Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com - Original Message From: Bryce Lohr <[EMAIL PROTECTED]> To: Pádraic Brady <[EMAIL PROTECTED]>; Zend FW General List Sent: Wednesday, May 30, 2007 5:08:47 PM Subject: Re: [fw-general] Zend_Filter_Input::getEscaped() I literally busted out laughing when I read that... I'll take that as a compliment. :) I'll get back working on that in a few days (I have a beta release of my own to get through first). As always, I'm wide open to suggestions for the "dumbing down" part... ;) Regards, Bryce Lohr Pádraic Brady wrote: > Probably worth noting Bryce Lohr's proposal is now in the Laboratory but > will not make it into the framework until after 1.0.0. It's a really > powerful approach but it's needs some dumbing down for the rest of us ;). > > http://framework.zend.com/wiki/display/ZFPROP/Zend_Validate_Builder+-+Bryce+Lohr > > Pádraic Brady > http://blog.astrumfutura.com > http://www.patternsforphp.com > > > - Original Message > From: Pádraic Brady <[EMAIL PROTECTED]> > To: Jur Jean <[EMAIL PROTECTED]> > Cc: Zend Framework General > Sent: Wednesday, May 30, 2007 9:29:37 AM > Subject: Re: [fw-general] Zend_Filter_Input::getEscaped() > > Hi Jur, > > I have the same preference as yourself. I'm not using the component yet > until it either reaches Core or is updated to reflect other potential > solutions. But for now you can subclass Zend_Filter_Input and override > its __get() method to change the default treatment of values to avoid > the automated escaping. > > A few other options are also available - check the proposal comments > over at: > http://framework.zend.com/wiki/display/ZFPROP/Zend_Filter_Input+redesign+-+Bill+Karwin > > Pádraic > > Pádraic Brady > http://blog.astrumfutura.com > http://www.patternsforphp.com > > > - Original Message > From: Jur Jean <[EMAIL PROTECTED]> > To: fw-general@lists.zend.com > Sent: Wednesday, May 30, 2007 9:17:49 AM > Subject: [fw-general] Zend_Filter_Input::getEscaped() > > > Why is Zend_Filter_Input::getEscaped() called by default when magic > accessing > vars? I use getUnescaped() a lot more often. > > In the view, you should use $this->escape(), the form helpers escapes > values, and when writing to my database i also don't want to escape using > this method, but use the db's escape method. > -- > View this message in context: > http://www.nabble.com/Zend_Filter_Input%3A%3AgetEscaped%28%29-tf3838924s16154.html#a10869449 > Sent from the Zend Framework mailing list archive at Nabble.com. > > > > > Ready for the edge of your seat? Check out tonight's top picks > <http://us.rd.yahoo.com/evt=48220/*http://tv.yahoo.com/> on Yahoo! TV. > > > > Choose the right car based on your needs. Check out Yahoo! Autos new Car > Finder tool. > <http://us.rd.yahoo.com/evt=48518/*http://autos.yahoo.com/carfinder/;_ylc=X3oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg-- > > > Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469
Re: [fw-general] Zend_Filter_Input::getEscaped()
I literally busted out laughing when I read that... I'll take that as a compliment. :) I'll get back working on that in a few days (I have a beta release of my own to get through first). As always, I'm wide open to suggestions for the "dumbing down" part... ;) Regards, Bryce Lohr Pádraic Brady wrote: Probably worth noting Bryce Lohr's proposal is now in the Laboratory but will not make it into the framework until after 1.0.0. It's a really powerful approach but it's needs some dumbing down for the rest of us ;). http://framework.zend.com/wiki/display/ZFPROP/Zend_Validate_Builder+-+Bryce+Lohr Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com - Original Message From: Pádraic Brady <[EMAIL PROTECTED]> To: Jur Jean <[EMAIL PROTECTED]> Cc: Zend Framework General Sent: Wednesday, May 30, 2007 9:29:37 AM Subject: Re: [fw-general] Zend_Filter_Input::getEscaped() Hi Jur, I have the same preference as yourself. I'm not using the component yet until it either reaches Core or is updated to reflect other potential solutions. But for now you can subclass Zend_Filter_Input and override its __get() method to change the default treatment of values to avoid the automated escaping. A few other options are also available - check the proposal comments over at: http://framework.zend.com/wiki/display/ZFPROP/Zend_Filter_Input+redesign+-+Bill+Karwin Pádraic Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com - Original Message From: Jur Jean <[EMAIL PROTECTED]> To: fw-general@lists.zend.com Sent: Wednesday, May 30, 2007 9:17:49 AM Subject: [fw-general] Zend_Filter_Input::getEscaped() Why is Zend_Filter_Input::getEscaped() called by default when magic accessing vars? I use getUnescaped() a lot more often. In the view, you should use $this->escape(), the form helpers escapes values, and when writing to my database i also don't want to escape using this method, but use the db's escape method. -- View this message in context: http://www.nabble.com/Zend_Filter_Input%3A%3AgetEscaped%28%29-tf3838924s16154.html#a10869449 Sent from the Zend Framework mailing list archive at Nabble.com. Ready for the edge of your seat? Check out tonight's top picks <http://us.rd.yahoo.com/evt=48220/*http://tv.yahoo.com/> on Yahoo! TV. Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. <http://us.rd.yahoo.com/evt=48518/*http://autos.yahoo.com/carfinder/;_ylc=X3oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg-- >
Re: [fw-general] Zend_Filter_Input::getEscaped()
Probably worth noting Bryce Lohr's proposal is now in the Laboratory but will not make it into the framework until after 1.0.0. It's a really powerful approach but it's needs some dumbing down for the rest of us ;). http://framework.zend.com/wiki/display/ZFPROP/Zend_Validate_Builder+-+Bryce+Lohr Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com - Original Message From: Pádraic Brady <[EMAIL PROTECTED]> To: Jur Jean <[EMAIL PROTECTED]> Cc: Zend Framework General Sent: Wednesday, May 30, 2007 9:29:37 AM Subject: Re: [fw-general] Zend_Filter_Input::getEscaped() Hi Jur, I have the same preference as yourself. I'm not using the component yet until it either reaches Core or is updated to reflect other potential solutions. But for now you can subclass Zend_Filter_Input and override its __get() method to change the default treatment of values to avoid the automated escaping. A few other options are also available - check the proposal comments over at: http://framework.zend.com/wiki/display/ZFPROP/Zend_Filter_Input+redesign+-+Bill+Karwin Pádraic Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com - Original Message From: Jur Jean <[EMAIL PROTECTED]> To: fw-general@lists.zend.com Sent: Wednesday, May 30, 2007 9:17:49 AM Subject: [fw-general] Zend_Filter_Input::getEscaped() Why is Zend_Filter_Input::getEscaped() called by default when magic accessing vars? I use getUnescaped() a lot more often. In the view, you should use $this->escape(), the form helpers escapes values, and when writing to my database i also don't want to escape using this method, but use the db's escape method. -- View this message in context: http://www.nabble.com/Zend_Filter_Input%3A%3AgetEscaped%28%29-tf3838924s16154.html#a10869449 Sent from the Zend Framework mailing list archive at Nabble.com. Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/
Re: [fw-general] Zend_Filter_Input::getEscaped()
Hi Jur, I have the same preference as yourself. I'm not using the component yet until it either reaches Core or is updated to reflect other potential solutions. But for now you can subclass Zend_Filter_Input and override its __get() method to change the default treatment of values to avoid the automated escaping. A few other options are also available - check the proposal comments over at: http://framework.zend.com/wiki/display/ZFPROP/Zend_Filter_Input+redesign+-+Bill+Karwin Pádraic Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com - Original Message From: Jur Jean <[EMAIL PROTECTED]> To: fw-general@lists.zend.com Sent: Wednesday, May 30, 2007 9:17:49 AM Subject: [fw-general] Zend_Filter_Input::getEscaped() Why is Zend_Filter_Input::getEscaped() called by default when magic accessing vars? I use getUnescaped() a lot more often. In the view, you should use $this->escape(), the form helpers escapes values, and when writing to my database i also don't want to escape using this method, but use the db's escape method. -- View this message in context: http://www.nabble.com/Zend_Filter_Input%3A%3AgetEscaped%28%29-tf3838924s16154.html#a10869449 Sent from the Zend Framework mailing list archive at Nabble.com. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz