Can an ActiveRecord model extend another ActiveRecord model?
Or it should be accessed using relation only?
Class A extends ActiveRecord{
public static function tableName(){
return 'a_table;
}
}
Class B extends A{
public static function tableName(){
return 'b_table;
}
}
But Is it possible? I guess not. For example, both the classes will have a static tableName() function.
What will the child class return for below static function: Will it return child table or parent table?
class Parent{
public static function tableName() {
return 'parent_table';
}
}
class Child extends parent{
public static function tableName() {
return 'child_table';
}
}
Child::tableName();