Some code first to explain my toughts:
<?php
abstract class A{
abstract public function foo();
}
abstract class B extends A{
abstract public function foo();
}
class C extends B{
public function foo(){}
}
?>
This doesn't work and gives the following error:
Fatal error: Can't inherit abstract function A::foo() (previously declared abstract in
Now, the example above is not exactly what I'm doing, but it's damn close. I have A, which is a very very general root class for basically everything in my class lib. B is a little more specific and acts as base root for a certain part of the class lib, and C is a direct class that inherits B and should implement the foo() function.
Is it not possible to pass on the task of implementing an abstract function?

New Topic/Question
Reply




MultiQuote



|