Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]

Method this_object()


Method this_object

object this_object(void|int level)

Description

Returns the object we are currently evaluating in.

level might be used to access the object of a surrounding class: The object at level 0 is the current object, the object at level 1 is the one belonging to the class that surrounds the class that the object comes from, and so on.

Note

As opposed to a qualified this reference such as global::this, this function doesn't always access the objects belonging to the lexically surrounding classes. If the class containing the call has been inherited then the objects surrounding the inheriting class are accessed.