acceptedProcessInterface)) return; if (!in_array($this->acceptedProcessInterface, class_implements($classname))) { throw new InvalidProcessType($classname); } } /** * Add new process into pipeline * * @param $process * * @return void * @throws InvalidProcessType */ function add($process) { $this->checkValidProcess($process); $this->processes[] = $process; } /** * @param null $beforeStart */ public function setBeforeStart($beforeStart) { $this->checkValidProcess($beforeStart); if (!is_null($this->beforeStart)) { array_unshift($this->processes, $this->beforeStart); } $this->beforeStart = $beforeStart; } /** * @param null $beforeRender */ public function setBeforeRender($beforeRender) { $this->checkValidProcess($beforeRender); if (!is_null($this->beforeRender)) { array_push($this->processes, $this->beforeRender); } $this->beforeRender = $beforeRender; } }