Why unset it once it is set? null is a perfectly valid value to set something to. If you want the ability to unset something implement it. Side effects like the one you describe will catch more than one person out. if not in this class then in others where this code style is taken as a template.
Remember all the code of the framework has to conform to the coding style of the framework. The framework will be taken as a code style guide and a code template. I am not sure about the coding style with regards to return parameters. Has it been decided to return "this" if nothing is expected? If nothing is expected then why would I expect to receive "this"?
Cheers,
Gerrit.
On 10/11/06, Simon Mundy <[EMAIL PROTECTED]> wrote:
Sounds great Matthew, cheers!
> -- Simon Mundy < [EMAIL PROTECTED]> wrote
> (on Friday, 10 November 2006, 09:12 AM +1100):
>> I noticed that the latest commit to the dispatcher has 'setParam' and
>> 'clearParam'. Would it be possible to supply a string or an array of
>> strings to 'clearParam' to selectively unset them as well as the
>> option to clear all?
>
> clearParams() is intended to clear the entire parameter stack.
>
> setParam($name, null) would clear a single value, though the array key
> would still exist; I'll modify the code to unset if a null value is
> passed.
>
> --
> Matthew Weier O'Phinney
> PHP Developer | [EMAIL PROTECTED]
> Zend - The PHP Company | http://www.zend.com/
--
Simon Mundy | Director | PEPTOLAB
""" " "" """""" "" "" """"""" " "" """"" " """"" " """""" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654
4124
http://www.peptolab.com
