headers[] = $header; } /** * Add redirection header * * @param string $url URL to redirect the client to * @return void * @access public */ public function redirect($url) { $this->add_header("Location: $url"); } /** * Sends headers to the client * * @return Response Same Response object, for method chaining * @access public */ public function send_headers() { foreach ($this->headers as $header) header($header); return $this; } /** * Send response body to the client * * @return object Same Response object, for method chaining * @access public */ public function send_body() { echo $this->body; return $this; } }