示例#1
0
 /**
  * Run the Middleware processes and then our actual sync process.
  *
  * @throws PropertyNotSetException
  */
 public function run()
 {
     if (!isset($this->sync)) {
         throw new PropertyNotSetException('sync');
     }
     $this->sortMiddleware();
     foreach ($this->middleware as $index => $middleware) {
         $middleware->beforeProcess($this->sync);
     }
     $this->sync->init();
     $this->sync->sync();
     foreach ($this->middleware as $index => $middleware) {
         $middleware->afterProcess($this->sync);
     }
 }