Record::dump
Up: class Record
This method represents the current contents of the Record object as an HTML table, with the supplied $label as identifying text as a string. This table contains one row for each field defined in the table, with the field names enclosed in back-quotes, for example `name`. If the field name is part of the unique identification of the record it is italicized, for example `name`. If there are any extra fields defined by method set or assignment to a field using subscripts these are identified by names enclosed in apostrophes, for example 'class'
. If the global $debug flag is true this method adds the string to the global variable $warn.
parameter | description |
---|---|
$label | a string which is used as a heading for the output. If this is omitted the name of the table is used. |
This method returns the string containing the description of the Record regardless of whether that output is added to $warn.
$record->dump(); // this adds the record description to $warn if $debug is true
// the following adds the record description to $warn regardless of the value of $debug
if ($debug)
$record->dump();
else
$warn .= $record->dump();
print $record->dump(); // this prints the description of the record
The example of output of this method is:
<p class='label'>Country Record constructed:</p>
<table border='1'>
<tr>
<th class='label'>
<i>`code`</i> </th>
<td class='dataleft'>
CA </td>
</tr>
<tr>
<th class='label'>
`name` </th>
<td class='dataleft'>
Canada </td>
</tr>
<tr>
<th class='label'>
`dialingcode` </th>
<td class='dataleft'>
1 </td>
</tr>
<tr>
<th class='label'>
`currency` </th>
<td class='dataleft'>
CAD </td>
</tr>
</table>
Next: $record->postData($xml)