View Source

<p>This page contains ideas on possible items that could go into Zend_Config for Zend Framework v 2.0.</p>


<h5>Variable substitution</h5>
<p>Allow placeholders in values that resolve to the value of another key.</p>
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
[log]
path = "/var/log"
file = "{log.path}/debug.log"
]]></ac:plain-text-body></ac:macro>

<p>is the same as:</p>
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
[log]
path = "/var/log"
file = "/var/log/debug.log"
]]></ac:plain-text-body></ac:macro>

<p>Potential issue: speed as we'll have to go though entire config object after loading to do substitution.</p>

<h5>Allow Zend_Config to cache its data</h5>
<p>See <a href="http://framework.zend.com/issues/browse/ZF-4585">ZF-4585</a><br />
Basic idea is:</p>
<blockquote>
<p>As performance is a critical point, I think Zend_Config should be given some kind of setCache(Zend_Cache_Core $cache) method to cache its data (or to cache itself, why not ?).<br />
This would prevent opening and parsing the backend (xml or ini) file each time we create the Zend_Config instance.</p></blockquote>