/** * 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); }
/** * 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); }