Hello, thanks for the reply. Well, isa(self) works to tell if the object has been instantiated. But I was thinking of a case where an object has been instantiated yet a method was called as a static function. So, I was interested in knowing how the function was called.
I guess it is more of an academic question, not sure if there is a use for this information. I usually assume that a method called with a parameter is a static, and a method called without a parameter is a not a static ( and checks isa(self) and looks internally for the required data). But I as thinking, this a there a way to tell if the method was called:
self->method ; called as object
or
className->method ; called as static
even when the class is instantiated. Like I said, might not be useful info but I was curious.
|