Esempio n. 1
0
 /**
  * execute
  *
  * @param MigrateCommand $command
  * @param callable $next
  *
  * @return mixed
  */
 public function execute($command, callable $next)
 {
     $migration = $command->getMigration();
     if ($migration instanceof OptionsAwareInterface) {
         $migration->setOptions($command->getOptions());
     }
     $next($command);
 }
Esempio n. 2
0
 /**
  * execute
  *
  * @param MigrateCommand $command
  * @param callable $next
  *
  * @return void
  */
 public function execute($command, callable $next)
 {
     $migration = $command->getMigration();
     $direction = $command->getOptions()->getDirection()->isUp() ? 'up' : 'down';
     $migration->{$direction}();
 }