[TYPO3-mvc] Abstract Classes and the DB

Lienhart Woitok Lienhart.Woitok at netlogix.de
Fri May 13 11:58:14 CEST 2011


Hello Zalán,

have you tried it this way? I think it should work in this manner, I have done a similar thing with an abstract base class and extending classes. This worked quite well for me.

So I think if you have problems, there might be something wrong with your implementation.

Kind regards,





Lienhart Woitok
Web-Entwickler

Telefon: +49 (911) 539909 - 0
E-Mail: Lienhart.Woitok at netlogix.de
Website: media.netlogix.de


--
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Andernacher Straße 53 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Internet: http://www.netlogix.de

netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt



-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von Zalán Somogyváry
Gesendet: Freitag, 13. Mai 2011 11:11
An: TYPO3 v4 MVC project
Betreff: Re: [TYPO3-mvc] Abstract Classes and the DB

Hello,

Thanks for the quick answer.

>> 1) Is it possible to create repositories of abstract classes in extbase?
>> 2) Is it possible to save and retrieve (!) an abstract class with single table inheritance?
>
> IIRC yes, as long as the class file of your model is regular named ("Model.php" and not "AbstractModel.php")

Hm. That means you have to break with the naming conventions... That's not very good ;( ...
What's the matter if we use Concrete Table Inheritance? Is the naming issue the same?

> But as I said, I'm not entirely sure. I of course use STI but I didn't declare my BaseModels as abstract for some reason I can't remember now.

My problem is that I have to make sure that every subclass has to implement a given method, but I can't use interfaces fpr that because there are other (gerneral) methods that are implemented in the abstract class. I have a scheme like this:

                        AbstractMediaItem
                             /                      \
            AbstractStream         AbstractFile
               /                                               \
      Video      Audio, etc.             Video, Audio, etc.

Is it possible to make a structure with more than one abstract instance like the one I described.

Regards,
Zalán



_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


More information about the TYPO3-project-typo3v4mvc mailing list