protected function updateToVersion($version, Database $database, Tlog $logger) { if (file_exists(THELIA_ROOT . '/setup/update/' . $version . '.sql')) { $logger->debug(sprintf('inserting file %s', $version . '$sql')); $database->insertSql(null, array(THELIA_ROOT . '/setup/update/' . $version . '.sql')); $logger->debug(sprintf('end inserting file %s', $version . '$sql')); } ConfigQuery::write('thelia_version', $version); }
protected function log($level, $message) { if ($this->usePropel) { switch ($level) { case 'debug': $this->logger->debug($message); break; case 'info': $this->logger->info($message); break; case 'notice': $this->logger->notice($message); break; case 'warning': $this->logger->warning($message); break; case 'error': $this->logger->error($message); break; case 'critical': $this->logger->critical($message); break; } } else { $this->logs[] = [$level, $message]; } }