/usr/portage

Naive type casting for Zend_Config 1

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.

Filed on 17-12-2007, 08:08 under , , & one comment & no trackbacks

Trackbacks

Trackback specific URI for this entry

No Trackbacks

Comments

  1. Wil Sinclair replys:
    published on December 18th 2007, 11:35:40 am *

    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.

    Reply

Add a Comment & let me know what you think