ZF-346: Implement Zend_Hash from Zend_Config
Description
As Zend_Config provides a property based interface to an array, we should rename it Zend_Hash.
We then need a new Zend_Config with a single factory method:
class Zend_config { static public function factory($adapterName, $adapterConfig = array(), $allowModifications = false); }
Comments
Posted by Darby Felton (darby) on 2006-08-31T10:44:17.000+0000
Pasting Rob's message to fw-general:
The idea is that Zend_Config is renamed to Zend_Hash and a new Zend_Config is written that mimics Zend_Db's factory().
The rationale is already in the comments for Zend_Config:
The new interface to Zend_Config will be pretty much identical to how Zend_Db's factory() works:
(The returned {{$config}} is of type Zend_Hash.)
This would mean that the current method of creating a Zend_Config would no longer work. i.e.
would fail and you would need to change the code to:
Posted by Rob Allen (rob) on 2006-09-01T03:27:24.000+0000
As discussed on the mailing list, Zend_Hash is the wrong name! Need a better one...
Posted by Darby Felton (darby) on 2006-09-19T12:43:18.000+0000
The current consensus is that we need not extract the referred functionality from Zend_Config into a separate "container" component intended to provide appropriate functionality for the generalized problem. Other framework components and applications are instead encouraged to implement such functionality according to their own specific needs, and opportunities for refactoring can be examined later with respect to actual needs.
Posted by Simon Mundy (peptolab) on 2006-09-30T20:10:06.000+0000
I was re-reading the lists again today and I thought common consensus was that a primitive container was a good idea. It had comments from Christopher, myself, Ralph, Ralf, Nico, Alexander and Matthew that indicated a more positive impression.
I think Christopher's summary was pretty good. All it needs is:-
...and currently Zend_Config has most of that.
Rob - have you progressed on any of the refactoring you had mentioned? I would be keen to rework ACL/Environment in the meantime to perform some preliminary testing on the suitability of Zend_Hash/Zend_Container/Zend_Array