[TYPO3-seminars] XCLASS the registrationmanager
Malte Koitka
malte at cytrus.de
Tue Oct 5 15:44:14 CEST 2010
Hi Oli,
thanks for the fast response. Changing the visibility from private to
protected was a valuable (also somekind of irritating ) hint. But
additionally I had to edit the "getInstance" method in the original
class file, because it always was returning the original instance. Now
"self::$instance" gets the object of
"ux_tx_seminars_registrationmanager()" and everything seems fine.
Do you see any way to implement that the clean way? I tried to redefine
the static function "getInstance" in the XCLASS, but to no avail.
One additional annotation: Redefining a private method in a subclass
worked for me some time ago, so I made a simple test.
class basis {
private function test() {
echo "Basistest";
}
}
class ext extends basis {
public function test() {
echo "Exttest";
}
}
$obj = new ext();
$obj->test();
It does return "Exttest", so my first thought would be that overriding
private functions works. But with the threads problem in mind, in some
contexts it actually does not.
Now, my question is: Why? :)
Thanks and best regards
Malte
More information about the TYPO3-project-seminars
mailing list