Objects are the most complex outputs in NewChk. They offer a lot of information with each call. Let’s take a look.
I’ll go through each aspect of the output from top to bottom. On the first line, the name of the object instance is $chkObjectClasses. The call that brought this display to your browser window was:
Across the top line, $chkObjectClasses is an object data type, the call to new chk($chkObjectClasses); was made in the NEWCHKTEST.php file on line number 188.
The second line says, that $chkObjectClasses is an instance of class $chkClass2. Followed by all the parent and parent-of-parent classes of the $chkClass2.
Parent classes are followed all the way through your code to capture all parents and grandparents. Parents are named in order of occurrence, first parent, then grandparents, then great-grandparents, etc. In the above output example, $chkObjectClasses is an instance of $chkClass2 which is extended by $chkParentClass, then $chkParentClass is extended by its parent, $chkSuperParent_Class.
The next section is the Class Properties. All the public properties of the class with the property name and value are displayed. Private, protected, and static properties are not displayed. All data types are shown, an array property is shown as an array. Public properties of all parents are shown. Parent and grandparent properties are shown in order of their occurrence. In the above example, the Parent properties are shown before the superParent properties.
The last section, the Class Methods, shows all the public and static methods of the class, with their method parameters.. Private and protected methods are not shown. The methods and parameters of parent and parent-of-parents are shown in the order of their hierarchical occurrence, first class, then parent, then grandparent, etc. If a method has no parameters, the parameter field is left blank, which means, in this example, you could just call $chkObjectClasses->chkMethod2(); to use the chkMethod2() method.
For those of you working in PHP frameworks, NewChk offers you a way to follow your class code all the way through the framework classes to see exactly what the framework is adding to your class.