Hello,
can anybody tell me how I can determine if a method is called statically (Class::method()) or from an instance ($myObject->method()) ? Until now I used
if (isset($this) && get_class($this) = 'myclassname'))
But maybe there is something more "clean" ? Anyway I noticed that the $this - variable is quite tricky. In earlier times I have been just asking whether $this is set or not, but this does not work, if an instance of another class calls the method statically. In this case isset($this) is always true.
thanx
Sebastian