Hello,
i want to translate this code of java to PHP5:
Code:
interface I{
//...
abstract void methode1();
}
abstract class A implements I{
void methode1(){
methode2();
}
abstract void methode2();
}
class C extends A{
void methode2(){
//do some...
}
}
i want to use this this way:
Code:
I i=new A(); //here is implicit upcasting
i.methode1(); // this methode will implecitely call methode2 of class A
how can i do upcasting in PHP5?
thanks in advance.