Probably yes, i didn't investigate this to deep. Casting float to string solves problem quickly and easy without time consuming locale recognition and conversion. In my opinion this can be case to thing for Zend_Json_Encoder and/or Zend_Wildfire_Protocol_JsonStream developers.I would not implement this at the protocol layer as you do want the numeric values to come through numeric on the client. This really belongs into the JSON encoder which should escape commas when encoding the numeric values. Alternatively the encoder uses the default US locale and then the client switches back to your local locale.
Not sure what the beast approach is. For now I will just cast it to a string as you have in the profiler.
Again - my solution is fast and easy. Ofcourse can pass some kind of "template" by Zend_Db_Profiler_Firebug constructor parameter, but, there are only 2 variables to replace (i didn't see place for any more useful informations for profiler label) and then we will have another time consuming str_replace or regexp, and forcing users to remember this variable names.The str_replace takes minimal time and this is a development/debug tool anyway. Not generally used in production. So speed it not of upmost importance.
I prefer to use the variables as I don't want to append something where the user will be wondering where it came from. There may also be cases where you want to have the time at the beginning and not the end.
--
| Christoph Dorn | |
| http://www.ChristophDorn.com/ | |
没有评论:
发表评论