log_indent += $indent; if ($log) { $tabs = str_repeat(" ", $this->log_indent); $a = $tabs.str_replace("\n", "\n ".$tabs, $log); $this->logs[] = ''.$a.''; } } function addPrint($log, $color='#FFFF00') { $this->logs[] = ''.$log.''; } function addError($log) { $this->logs[] = ' ERROR: '.$log.''; } function getLogs() { $ret = ''; if ($this->logs && $this->enable) $ret = "Debug\n\n".implode("\n", $this->logs); $this->logs = array(); return $ret; } } ?>