[TYPO3-v4] "CGL" policy for new hooks?

Stefan Geith typo3dev2010.nospam1 at geithware.de
Wed Mar 23 10:23:53 CET 2011


Am 22.03.2011 20:02, schrieb Dmitry Dulepov:
> [...]
> If the interface is defined, it must be defined to service specific
> hook's requests, not be generic.
>
> I see only two possible cases:
> - do not use interfaces: the developer is free to add new parameters if
> (s)he wants
> - use interfaces for hooks and never add new parameters

What about using interfaces, but with a mandatory last parameter 
$additionalParams, that is/may be an empty array ?

e.g.
interface t3lib_interface_hookxyz {
  function execute($id, array $values, $more, $ref, $additionalParams);
}

The most important parameters are fixed an defined in the interface.
Parameters that get added later (seems they are not so important,
when the were not in the inital Verion of the hook ...) can
be in the $additionalParams-Array.

/Stefan



More information about the TYPO3-project-v4 mailing list