Dumpers

Writing a new Dump

If you are using patTemplate in a CLI environment or do not like the style of the Dump we provide, you may implement your own Dumper object. Just follow the following steps:

1. Create a new file in patTemplate/Dump
2. Create a new class in this file, that extends patTemplate_Dump
3. Implement the needed methods: displayHeader(), displayFooter(), dumpGlobals() and dumpTemplates()

The methods displayHeader() and displayFooter() do not accept any parameters. The dumpGlobals() method will receive an array with all global template variables. The method dumpTemplates() will recieve two arrays, one with the template structures and content and one with the variables, that have been assigned.
Tip

Make use of print_r()
To get familiar with the structures passed to the Dump object, we recommend to use print_r() or var_dump() on the parameters.

Last Updated ( Friday, 31 December 2004 )