[TYPO3-mvc] Abstract Classes and the DB

Zalán Somogyváry zalan at gmx.net
Fri May 13 11:10:41 CEST 2011


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





More information about the TYPO3-project-typo3v4mvc mailing list