1

Naive type casting for Zend_Config

published on 2007|12|17

We have added a feature I call naive type detection/casting to Zend Framework’s Zend_Config. Per default Zend_Config is not aware of types, everything is a string (except the crappy auto-detection parse_ini_file() does, but that’s another – ugly – chapter). Our patch provides an opt-in feature to detect wheither something is an integer, a string, a float or a boolean. It does that when a value is fetched, which should be the fastest way (most of configuration values are fetched one time, during a page load). The related ticket is #2312 and the latest patch is available here.

Comments

Show comments linear or threaded

Wil Sinclair replies:
published on 2007|12|18, 11:35h
*

Thanks for the patch! I’ll be perfectly honest- I’m still getting used to PHP’s somewhat strange (to me anyways) typing rules, but I’m looking forward to trying this out.

Add comment


Textile-formatting allowed
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
Pavatar/Gravatar/Favatar/MyBlogLog author images supported.