public function getLog($toClean = true) { $log = $this->log; if ($toClean) { $this->log = array(); } return $log; }