public static function to($url) { Response::clean(); Response::header('Location', $url); Response::send(); exit; }
public static function back() { if ($link = Filter::with('core.redirect', empty($_SERVER['HTTP_REFERER']) ? Request::get('redirect_uri', false) : $_SERVER['HTTP_REFERER'])) { Response::clean(); Response::header('Location', $link); Response::send(); exit; } }
public function respond(Response $response) { $ajaxResponse = array(); $ajaxResponse['components'] = array(); $ajaxResponse['header'] = array(); $ajaxResponse['script'] = $this->script; $headerResponse = new HeaderResponse($response); foreach ($this->components as $component) { $response->clean(); $component->beforePageRender(); $component->render(); $value = $response->getBody(); $response->clean(); array_push($ajaxResponse['components'], array('id' => $component->getMarkupId(), 'value' => $value)); $this->renderComponentHeader($component, $response, $headerResponse); $value = $response->getBody(); array_push($ajaxResponse['header'], $value); $response->clean(); } FeedbackModel::get()->cleanup(); header('Content-Type: application/json'); print json_encode($ajaxResponse); }
public function respond(Response $response) { $response->clean(); $response->setHeader('Location: ' . $this->url, 301); $response->flush(); }