/** * Sends the traveler down a pipe * * @param Pipe $pipe Pipe to send traveler down * * @return void */ public function travel(Pipe $pipe) { $pipe->setStream($this->progress->stream); $this->progress->startOfPipe($this, $pipe); $models = $pipe->flowThrough($this->bag); $pipes = $this->getPipes($models); if (count($pipes) === 0) { // END OF THE LINE \Log::info('PIPELINE FINISHED'); $this->progress->endOfPipeline($this); return; } $this->previousPipes[] = $pipe; $this->nextPipe = null; foreach ($pipes as $pipe) { $this->progress->endOfPipe($this, $pipe); $this->queueTravel($pipe); } }