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

Oliver Hader oh at inpublica.de
Tue Feb 5 17:37:59 CET 2008


Hi,

Ingo Renner schrieb:
> Michael Stucki wrote:
>>> * init -> __construct()
>>
>> I disagree! First, the constructor would not allow any parameters. 
>> Second,
>> it is not possible to reinitialize an existing object otherwise.
> 
> what? who told you so? a constructor can of course take parameters.
> how could this work then?
> 
> $e = new Exception($message, $code);
> 
> what's wrong with the following?
> 
> $class  = t3lib_div::makeInstanceClassName('myClass');
> $object = new $class($param1, $param2, $paramN);

Yes!

>>> * $is_acquired -> $isAcquired (also does not need initialization during
>>> definition as you initialize it in the constructor)
>>
>> The idea was that the lockObject can be reused by calling init() again.
> 
> what for?

I guess that also extensions could use this locking (e.g. an extension 
is update any kind of index or has an own caching mechanism). But in 
that case it is better to create a new instance of t3lib_lock and not 
using the global one.

olly
-- 
Oliver Hader
http://inpublica.de/


More information about the TYPO3-team-core mailing list