예제 #1
0
파일: Update.php 프로젝트: alex63530/thelia
 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);
 }
예제 #2
0
 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];
     }
 }