private function redirectBack() { $referrer = $this->request->getReferer(); $current = $this->request->getUrl(); if ($referrer && !$referrer->isEqual($current)) { header('Location: ' . $referrer); exit; } }
/** * @return void */ private function returnBack() { $currentUrl = $this->request->getUrl(); $refererUrl = $this->request->getReferer(); if ($refererUrl === NULL) { throw new \RuntimeException('Unable to redirect back because your browser did not send referrer'); } elseif ($refererUrl->isEqual($currentUrl)) { throw new \RuntimeException('Unable to redirect back because it would create loop'); } header('Location: ' . $refererUrl); exit; }
protected function runCronJobs() { $this->cron->run(); header('Location: ' . $this->request->getReferer()); exit; }