[TYPO3-core] RFC: #7333: Solution for "Page is being generated"

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Thu Feb 7 16:44:49 CET 2008


Michael Stucki schrieb:
> 
>> I'm a bit unhappy that you have to refer to
>> $TYPO3_CONF_VARS['SYS']['lockingMode'] when you instantiate a locking
>> object. There is some merit that you can choose a mech at runtime, but
>> it'd be easier if the method is optional (or '' would choose the default
>> via $TYPO3_CONF_VARS).
> 
> I disagree! The locking mode solely depends on the system, so there is no
> sense if some extension author likes to choose his own favourite.

But why do you use $TYPO3_CONF_VARS['SYS']['lockingMode'] in tslib_fe? The 
logical place would be in t3lib_lock.

t3lib_lock should only be a small factory class that gets you an object 
with the configured implentation. The actual methods would be classes that 
could derive from a locking base class. But this would be different from 
t3lib_lock.

Another aproach would be to avoid the factory class and put the 
instantiation code into a single function of t3lib_div, eg called 
getLockingObject(). This method would return an object that implements the 
locking interface (determined by $TYPO3_CONF_VARS['SYS']['lockingMode']).

The advantage of both ways is that you have only one place in the Core 
where you have to access the $TYPO3_CONF_VARS.

Masi


More information about the TYPO3-team-core mailing list