abstract classes

Hi all,

I run into the following problem:

I have a parent class which is abstract and doesn’t relate to any table on the database. Its children model a table each.

I’d like these children classes being CActiveRecord children too but I don’t seem to be able to extend my parent class from CActiveRecord since there is no table to model. It’d be no problem if only I could extend from two classes but php doesn’t allow that.

abstract class A {


class B extends A { // problem here is that I can only extend from one class and not two


How do you people go about this conundrum?


I don’t get your problem… Why don’t you let your parent class be abstract and extend CActiveRecord?

Sorry, my mistake. I thought I had to implement the CActiverRecord::tableName() in all CActiveRecord children but I now see this is not so.

Problem solved.