Esempio n. 1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $workflow = ucfirst($this->argument('name'));
     if (!$this->pipelines->exists($workflow)) {
         return $this->error("The workflow [{$workflow}] does not exist.");
     }
     $this->info($this->drawer->draw($workflow));
 }
Esempio n. 2
0
 /**
  * Set the pipes of the given workflow.
  *
  * @author	Andrea Marco Sartori
  * @param	string	$workflow
  * @return	void
  */
 protected function setPipesOfWorkflow($workflow)
 {
     $pipes = $this->pipelines->getPipesByPipeline($workflow);
     $this->pipes = array_map(function ($pipe) {
         $chunks = explode('\\', $pipe);
         return end($chunks);
     }, $pipes);
     $this->geometry->setPipes($this->pipes);
 }
Esempio n. 3
0
 /**
  * Dispatch the given workflow.
  *
  * @author	Andrea Marco Sartori
  * @param	string	$workflow
  * @return	mixed
  */
 protected function dispatchWorkflow($workflow)
 {
     $job = $this->inflector->getJob();
     $request = $this->resolveRequest();
     $pipes = $this->pipelines->getPipesByPipeline($workflow);
     $parameters = $this->container->make('router')->current()->parameters();
     return $this->dispatcher->pipeThrough($pipes)->dispatchFrom($job, $request, $parameters);
 }