PHP OOP. How to get value of constant __METHOD__ of class what create an instance of other class inside that other class? -


we have class , class b.
class b have public property $class_a.
few functions few functions of class b can set $this->class_a = new a(__method__);
need know value of class b __method__ inside class a.
i'm using inside class a:

public function __construct($owner_method){ //some code.. } 

is possible not pass parameter during construct?
is possible access such constants of "class owner" when i'm inside class ?

i think need pass doing. get_parent_class exists when extending objects, not doing, passing seems not only option more proper , reusable me.

in short: no, need carry on passing in, whether in constructor or individual log method.


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -