compared with
Current by Rob Allen
on Oct 03, 2006 16:21.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (43)

View Page History
h1. Overview
<h1>Overview</h1>

This page contains information not otherwise found in the [issue tracker|http://framework.zend.com/issues/secure/IssueNavigator.jspa?reset=true&mode=hide&pid=10000&sorter/order=DESC&sorter/field=priority&resolution=-1&component=10010], especially for proposed improvements and notes on design decisions.
<p>This page contains information not otherwise found in the <a href="http://framework.zend.com/issues/secure/IssueNavigator.jspa?reset=true&amp;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>


{toc-zone:location=top|type=list|minlevel=3|indent=20px|printable=true}
<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>Allow loading of multiple sections</h3>

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

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

Implementing this would mean:

* Adding a {{getSectionName()}} method would no longer be semantically appropriate
* First level properties would correspond with section names (e.g., $config->sectionName)
<p>Implementing this would mean:</p>

<ul>
<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>
</ul>

h3. Add {{getSectionName()}} method

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>See <a href="http://framework.zend.com/issues/browse/ZF-413">ZF-413</a></p>

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

h3. Add {{getWithDefault()}} method
<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>

Ability to simplify:

<h3>Add <code>getWithDefault()</code> method</h3>
{code}
<p>Ability to simplify:</p>

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

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

<p>See <a href="http://framework.zend.com/issues/browse/ZF-414">ZF-414</a></p>

h3. Test for circular section extension in adapters

A configuration data section may inherit from another section, but an exception should be thrown where circular inheritance is detected by the storage adapter.
<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>

h3. Remove Zend_Config_Array
<p>See <a href="http://framework.zend.com/issues/browse/ZF-415">ZF-415</a></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 {{$config}}.
<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="http://framework.zend.com/issues/browse/ZF-416">ZF-416</a></p>
{toc-zone} </ac:rich-text-body></ac:macro>