Piwik\Updater\Migration::exec PHP 메소드

exec() 추상적인 공개 메소드

Executes the migration.
abstract public exec ( ) : void
리턴 void
    public abstract function exec();

Usage Example

예제 #1
0
파일: Updater.php 프로젝트: piwik/piwik
 /**
  * @param $file
  * @param Migration $migration
  * @throws UpdaterErrorException
  * @api
  */
 public function executeMigration($file, Migration $migration)
 {
     try {
         $this->executeListenerHook('onStartExecutingMigration', array($file, $migration));
         $migration->exec();
     } catch (\Exception $e) {
         if (!$migration->shouldIgnoreError($e)) {
             $message = sprintf("%s:\nError trying to execute the migration '%s'.\nThe error was: %s", $file, $migration->__toString(), $e->getMessage());
             throw new UpdaterErrorException($message);
         }
     }
     $this->executeListenerHook('onFinishedExecutingMigration', array($file, $migration));
 }