mercredi 10 juin 2015

Finding which method in the child class called the method in the base class

I'm trying to get the name of the method from the child class that called my method in the base class. How can I go about getting this?

class MyBaseClass {
    protected static function mybasemethod() {
        // how can I get the name of the method that called this?
        // I'm looking for 'myothermethod'
    }
}


class MyClassA extends MyBaseClass {
   protected static function myothermethod() {
       self::mybasemethod();
   }
}





Aucun commentaire:

Enregistrer un commentaire