1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-19 12:21:46 +02:00

added NClass

This commit is contained in:
David Grudl
2007-11-11 04:59:39 +00:00
parent 9ff43d0ac3
commit fd1d2b86ff
6 changed files with 63 additions and 57 deletions

View File

@@ -453,28 +453,24 @@ abstract class DibiResult extends NObject implements IteratorAggregate, Countabl
*/
public function dump()
{
echo '<table class="dump">';
echo '<thead>';
echo '<tr>';
echo '<th>#row</th>';
echo "\n<table class=\"dump\">\n<thead>\n\t<tr>\n\t\t<th>#row</th>\n";
foreach ($this->getFields() as $field) {
echo '<th>' . htmlSpecialChars($field) . '</th>';
echo "\t\t<th>" . htmlSpecialChars($field) . "</th>\n";
}
echo '</tr>';
echo '</thead>';
echo '<tbody>';
echo "\t</tr>\n</thead>\n<tbody>\n";
foreach ($this as $row => $fields) {
echo '<tr><th>', $row, '</th>';
echo "\t<tr>\n\t\t<th>", $row, "</th>\n";
foreach ($fields as $field) {
//if (is_object($field)) $field = $field->__toString();
echo '<td>', htmlSpecialChars($field), '</td>';
echo "\t\t<td>", htmlSpecialChars($field), "</td>\n";
}
echo '</tr>';
echo "\t</tr>\n";
}
echo '</tbody>';
echo '</table>';
echo "</tbody>\n</table>\n";
}