/** * @param AbstractStep $step * @return Installer */ protected function addStep(AbstractStep $step) { if (!$this->firstStep) { $this->firstStep = $step; $this->lastStep = $step; } else { $this->lastStep->chainNextStep($step); $this->lastStep = $step; } return $this; }
/** * @param AbstractStep $step * @return Installer */ protected function addStep(AbstractStep $step) { if (!$this->firstStep) { $this->firstStep = $step; $this->lastStep = $step; $step->setPixie($this->pixie); $step->setView($this->view); } else { $this->lastStep->chainNextStep($step); $this->lastStep = $step; } return $this; }
/** * @param AbstractStep|null $next * @return \App\Installation\Step\AbstractStep|null Added step */ public function chainNextStep(AbstractStep $next) { $this->next = $next; $next->setPixie($this->pixie); $next->setView($this->view); $next->setPrevStep($this); return $next; }