[TYPO3-core] RFC: #7333: Solution for "Page is being generated"
Michael Stucki
michael at typo3.org
Thu Feb 7 13:41:51 CET 2008
Oliver Hader wrote:
>>> 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!
You are right of course! I'm rarely using it, but that doesn't mean it is
not possible...
>> 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.
Agreed. So I will drop the (re-)init() method and use the constructor
instead.
- michael
--
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
More information about the TYPO3-team-core
mailing list