As with most classes, you often have to call a method to get a value and not directly access a property as the method might do some additional checks you'd lose if you accessed the property directly.
To get a list of all available methods without looking into the code, just add the following code where you'd like to get more information. Let's put it in
default.php
again like we did with the constants:<?php $b = new Area('Main'); $b->display($c); echo '<xmp>'; $reflection = new ReflectionClass($this); print_r($reflection->getMethods()); echo '</xmp>'; ?>
This will print a long list where you can find all the available methods next to the property named
name
:Array ( [0] =>ReflectionMethod Object ( [name] =>getInstance [class] => View ) [1] =>ReflectionMethod Object ( [name] =>getThemeFromPath [class] => View )