Example #1
0
 /**
  * Execute steps
  * @param StepCollection $steps
  * @return Invoker
  */
 public function execute(StepCollection $steps)
 {
     $this->dispatcher->dispatch(Events::INVOKER_START, new InvokerEvent($steps));
     foreach ($steps->getIterator() as $step) {
         $step->execute($this->dispatcher);
     }
     $this->dispatcher->dispatch(Events::INVOKER_FINISH, new InvokerEvent($steps));
     return $this;
 }
Example #2
0
 /**
  * Get steps
  * @return StepCollection
  */
 public function getSteps()
 {
     $steps = new StepCollection('Building SugarCRM');
     $steps->add('Pre flight checks', array($this, 'preFlightChecks'))->add('Cleanup target directory', array($this, 'cleanupTargetDir'))->add('Rome build', array($this, 'romeBuild'))->add('Running composer', array($this, 'runComposer'))->add('Clear caches', array($this, 'clearCache'))->add('Alter PHP Version constraints', array($this, 'alterVersionConstraints'));
     return $steps;
 }