';
foreach ($this->_row as $key=>$field) {
foreach ($field as $type=>$content) {
if ($field[$type] !== '') {
$field[$type] = ''.$field[$type].'';
} else {
unset($field[$type]);
}
}
echo '';
if (!empty($field)) {
echo implode(' ', $field);
} else {
echo ' ';
}
echo ' | ';
}
echo '
';
foreach ($this->columns as $col) {
$this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');
}
}
/**
* Add tracking info
* @param string $col name of column
* @param string $msg message
* @param string $level 'normal', 'warning' or 'error'
* @param bool $merge true means add as new line, false means override all previous text of the same type
* @return void
*/
public function track($col, $msg, $level = 'normal', $merge = true) {
if (empty($this->_row)) {
$this->flush(); //init arrays
}
if (!in_array($col, $this->columns)) {
debugging('Incorrect column:'.$col);
return;
}
if ($merge) {
if ($this->_row[$col][$level] != '') {
$this->_row[$col][$level] .='