View Source


<p>This page contains information not otherwise found in the <a href=";mode=hide&amp;pid=10000&amp;sorter/order=DESC&amp;sorter/field=priority&amp;resolution=-1&amp;component=10010">issue tracker</a>, especially for proposed improvements and notes on design decisions.</p>

<ac:macro ac:name="toc-zone"><ac:parameter ac:name="location">top</ac:parameter><ac:parameter ac:name="type">list</ac:parameter><ac:parameter ac:name="minlevel">3</ac:parameter><ac:parameter ac:name="indent">20px</ac:parameter><ac:parameter ac:name="printable">true</ac:parameter><ac:rich-text-body>

<h3>Allow loading of multiple sections</h3>

<p>Adapters could allow the section specification parameter to be <code>mixed</code>:</p>

<li><code>string</code> - Names a single section to be loaded (currently supported)</li>
<li><code>array</code> - Array of strings, which are the names of multiple sections to be loaded</li>
<li><code>null</code> - Indicates that all sections should be loaded</li>

<p>Implementing this would mean:</p>

<li>Adding a <code>getSectionName()</code> method would no longer be semantically appropriate</li>
<li>First level properties would correspond with section names (e.g., $config-&gt;sectionName)</li>

<p>See <a href="">ZF-413</a></p>

<h3>Add <code>getSectionName()</code> method</h3>

<p>This is in order to easily retrieve the configuration data section name upon demand without having to store it outside the class or create an extending class. This is particularly useful where a Zend_Config object instance is stored and fetched using an application registry.</p>

<h3>Add <code>getWithDefault()</code> method</h3>

<p>Ability to simplify:</p>

<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
$dbName = $config->db->name ? $config->db->name : 'default';

<p>Not sure how function signature would look though.</p>

<p>See <a href="">ZF-414</a></p>

<h3>Test for circular section extension in adapters</h3>

<p>A configuration data section may inherit from another section, but an exception should be thrown where circular inheritance is detected by the storage adapter.</p>

<p>See <a href="">ZF-415</a></p>

<h3>Remove Zend_Config_Array</h3>

<p>The current version of Zend_Config may be instantiated with an array of configuration data. Zend_Config_Array is no longer necessary, since its only added value is that it loads a specified file, and it rather arbitarily requires that the array be named <code>$config</code>.</p>

<p>See <a href="">ZF-416</a></p>