[Typo3-dev] Library manager instead of globals

Martin T. Kutschker Martin.T.Kutschker at blackbox.net
Tue Mar 16 17:11:44 CET 2004


René Fritz wrote:
> 
> The service keys are also registered as service type, therefore it's possible 
> to get a service by it's key. To make that work service types with prefix tx_ 
> and user_ are disallowed.

Aha.

>>I guess you read all those nice comments on
>>http://www.php.net/manual/en/function.register-shutdown-function.php ?
> 
> Yes but it didn't helped :-)

Well, those comment feature on php.net, but I'd appreciate if they'd be 
clean up after some time. Half olf them always contradicts the other half.

 > I tried that but it didn't worked. Maybe I made a mistake somewhere. I
 > have to check again.

Post the source code or the relevant parts of it.

> Is it a bad idea to change makeInstance() into function &makeInstance() anyways?

No as ist makes no difference unless you use $ =& &makeInstance() as well.

> Would that still work with php5?

Well, I only had a glance at the changes and there is a lot to come in 
PHP5 including destructors. So you might want to have a look at it 
anyway before doing your workarounds for PHP4 (eg it might be possible 
to use a sensible naming that allows to reuse the destructor for PHP5 
and PHP4).

And for your question, I guess the answer is yes. I'm pretty sure that 
there it is either backward compatible or there is some switch in PHP5 
that enables compatibilty.

Now that PHP5 is near and Typo3 sees some internal chances in its class 
system it might be a good idea to try to be "forward compatible".

Masi





More information about the TYPO3-dev mailing list