[TYPO3-core] RFC: #11438: Add a registry to t3lib
Bastian Waidelich
bastian at typo3.org
Mon Aug 10 15:47:14 CEST 2009
Ingo Renner wrote:
Hi Ingo,
> For certain purposes it'd be nice to have a place to store key, value
> pairs.
useful feature.
Instead of the "namespacePrefix.key" syntax, why don't you add an
argument for the namespace?
public function get($namespace, $key, $defaultValue) {}
public function set($namespace, $key, $value) {}
And maybe even add a DB field for it even:
CREATE TABLE sys_registry (
entry_namespace varchar(128) DEFAULT '' NOT NULL,
entry_key varchar(128) DEFAULT '' NOT NULL,
entry_value longtext,
UNIQUE KEY entry_identifier (entry_namespace,entry_key)
);
That would make it easier to e.g. display all values of one extension.
And then I second Olivers remark "is it required to have everything from
the registry table loaded?"
Maybe it's a good idea to load all values of a namespace as soon as it's
accessed the first time?
Bastian
More information about the TYPO3-team-core
mailing list