[TYPO3-core] RFC: #11438: Add a registry to t3lib

Ingo Renner ingo at typo3.org
Mon Aug 10 15:55:53 CEST 2009


Bastian Waidelich wrote:

Hi Bastian,

> useful feature.
> Instead of the "namespacePrefix.key" syntax, why don't you add an
> argument for the namespace?

I already thought about that and actually also had a version of the 
registry with that additional parameter implemented. In the end however, 
I found it making things more complecated than they need to be, which is 
why I left it out at the end.

> That would make it easier to e.g. display all values of one extension.

That could still be done with a method like Olly proposed, 
getByNamespace(). That would then just run through all keys and check 
whether they start with the requested namespace. (Would be bad 
performance wise though)

> And then I second Olivers remark "is it required to have everything from
> the registry table loaded?"

See my reply to Olly, IMO it simplifies the thing a lot. If we see that 
people put all kinds of stuff into it and bloat up the registry, we 
could still do something about it IMO.

> Maybe it's a good idea to load all values of a namespace as soon as it's
> accessed the first time?

Lazy loading might be an option then, but that would also require 
consecutive queries after the initial (and for now only) one.

I'd say we need to see how things go and how people use it before we 
should tweak it and maybe making it more complicated than it needs to be.


best
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2



More information about the TYPO3-team-core mailing list