[Typo3-dev] Smaller Switch Constructs
Mathias Schreiber [wmdb>]
mathias.schreiber at wmdb.de
Wed Nov 10 16:29:35 CET 2004
Hi guys,
I just did a rather small xclass on the Actions Module and thought that
maybe if would make sende to keep the switch constructs smaller and use
more functions instead of writing code inside the cases.
At the moment it is like this:
switch(whatever) {
case foo:
LOTS OF CODE
break;
case bar:
EVEN MORE CODE
break;
}
this makes xclassing a bit difficult unless anyone could point me to a
solution how to xclass a certain case only.
What about something like this:
switch(whatever) {
case foo:
$void = $this->functionCall1();
break;
case bar:
$void = $this->functionCall2();
break;
}
This would make xlcassing much faster because I would only need to
extend the function and not copy the whole switch construct into my xclass.
Ideas welcome
Mathias
More information about the TYPO3-dev
mailing list