/** (Inlcude and) print a part.
* The actual part class inclusion and instatiation itself is tried like this:
* - print<partName> method on $this
* $thisfunction (->(<partName>)->(), which does:
* - <pntType><partName> from application folder
* - <pntType><partName> from classes folder
* - <partName> from application folder
* - <partName> from classes folder
* - skin<pntType><partName>.php from application folder
* $this->(<partName), which does:
* - skin<partName>.php from application folder
* - skin<partName>.php from classes folder
* Where <pntType> may be replaced by overriding ::getSpecificPartPrefix().
* What actually happened may be inferred from the debug comments printed when Site>>debugMode is set to verbose
* @param string $partName the name of the part to print.
* more params will be passed to ::getPart.
*/
function printPart($partName) {
$this->($partName); //prevent debug comments with uncontrolled content
$debug = $this->();
if (!$debug)
return $this->(func_get_args());
$this->($partName, $debug);
$this->(func_get_args());
print "\n<!-- /$partName -->\n";
}
|