/** * Redirect to another URL with an HTTP header. Can pass along an HTTP status code. * * @access public * @param array $url * @param int $code * @return void */ public function redirect($url, $code = 302) { if (is_array($url)) { $url = Router::construct($url); } $this->status($code)->header('Location', $url, true)->contentBody(null)->respond(); }