[TYPO3-core] USER_CINT again

Dmitry Dulepov dima at spamcop.net
Tue Feb 28 17:12:51 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

Martin Kutschker wrote:
> You mean, TYPO3 should call a method (via TS stateFunc) first that
> returns the mode. And then it shall call the object again (the TS
> userFunc)?

Yes.

> 
> Hm, the problem is that userFunc takes a complete definition of the
> object. So for two calls we have to create two instances.

Second function was not needed before now. But I think it is better to
have two clearly distinct functions for clearly distinct tasks than to
return one result on one call, second on the second, third on the third,
etc.

What happens if in half-year we invent USER_DINT and need to cache/not
cache/crash the server/whatever depending on its state? I think putting
it all into userFunc is too much. It makes a big mess. Much better to
use separate functions: one PHP function per one logical application
function. Teaspoon for tea, knife for cutting, etc. Though it is
possible to use them the other way, of course.

> Or an I create a locally persistent object? I mean a thingy I can
> call again in my context, but which isn't available for all the code.
> AFAIK the persistent objects are stored in some global array.

I need to think about it, cannot comment right now.

Dmitry.
- --
"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)

iD8DBQFEBHaCRVcYnKJ8N6kRAkZFAJ0QvLkyi7xImdfsT8XPpXU5uvNUywCgv9uG
iT+RGtDU9AsiBqAzndbwkog=
=6qng
-----END PGP SIGNATURE-----



More information about the TYPO3-team-core mailing list