Object.zClassName
zClassName() -> string
Description
Returns the base class name of the object.
TipInstead of checking for a specific class name, your code will be more flexible if you use
zHasMethod
instead, to check if the object responds to specific methods. This is referred to as “Duck Typing”, a dynamic approach to object-oriented design.
Checking TypesFor a simpler way to check base types, use methods like
isList
, etc.$obj = MyClass() $obj.zClassName() //= 'MyClass'