-- drm <[email protected]> wrote (on Thursday, 22 October 2009, 03:57 PM +0200): > Martin Martinov wrote: > > Somebody will correct me if I'm wrong but I think it filters out the - > > because the filtered value must be a valid php variable identifier. > > > The doc comment does seem to confirm your point, but it isn't really a > must, though. > > <?php > $varName = 'a-b-c-d'; > $obj = new stdClass; > $obj->$varName = "w00t"; > echo $obj->{'a-b-c-d'}; > > outputs "w00t", so it is possible to have irregular characters in > identifiers.
Yes, but this is a notation that many developers are unfamiliar with. > You (Ralf) might want to propose a fix for this, adding an option for > the filter regex used? In the mean time the only solution seems to be to > change the hard coded regex yourself in the Zend code. Actually, better: extend Zend_Form and override filterName() in your extending class. This is a decision we plan to revisit with 2.0, but cannot change right now without breaking backwards compatibility. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/
