Merge pull request #70 from skipperbent/development

[FEATURE] Added http code to redirect method.
This commit is contained in:
Simon Sessingø
2016-03-14 00:59:09 +01:00
+6 -1
View File
@@ -19,8 +19,13 @@ class Response {
* Redirect the response
*
* @param string $url
* @param int $httpCode
*/
public function redirect($url) {
public function redirect($url, $httpCode = null) {
if($httpCode !== null) {
$this->httpCode($httpCode);
}
$this->header('Location: ' . $url);
die();
}