예제 #1
0
 /**
  * Describes a manifest.
  *
  * @param ManifestInterface $manifest Manifest
  * @param OutputInterface   $output   Output
  */
 private function describeManifest(ManifestInterface $manifest, OutputInterface $output)
 {
     $builder = new ProcedureBuilder();
     $manifest->configureProcedureBuilder($builder);
     $output->writeln(sprintf("Manifest description for <info>%s</info>\n", $manifest->getName()));
     $output->writeln("<fg=blue;options=bold>PROCEDURE CONFIGURATION</fg=blue;options=bold>\n");
     $this->describeProcedure($builder->getProcedure(), $output);
 }
예제 #2
0
 /**
  * Configures and runs a manifest.
  *
  * @param ManifestInterface $manifest Manifest to be run
  */
 public function run(ManifestInterface $manifest)
 {
     $builder = new ProcedureBuilder();
     $processor = $manifest->getProcessor();
     if ($this->dispatcher) {
         $processor->setEventDispatcher($this->dispatcher);
     }
     $manifest->configureProcedureBuilder($builder);
     $manifest->configureProcessor($manifest->getProcessor());
     $procedure = $builder->getProcedure();
     $processor->addProcedure($procedure)->process();
 }
예제 #3
0
 /**
  * Applies input data.
  *
  * @param ManifestInterface $manifest Manifest
  * @param string            $input    Input data
  */
 private function applyInputData(ManifestInterface $manifest, $input)
 {
     if ($manifest instanceof InputDataAwareManifestInterface) {
         $manifest->setInputData($input);
     }
 }