[BUGFIX] Improvements

- Fixed errors with getRoute method.
- Added Response and Request classes.
- Added CSRF stuff.
- Cleanup and bugfixes.
This commit is contained in:
Simon Sessingø
2015-10-18 17:36:06 +02:00
parent 0650e5ba93
commit b3b362a9e6
11 changed files with 272 additions and 90 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace Pecee\Http;
class Response {
/**
* Set the http status code
*
* @param int $code
* @return self $this
*/
public function httpCode($code) {
http_response_code($code);
return $this;
}
/**
* Redirect the response
*
* @param string $url
*/
public function redirect($url) {
header('location: ' . $url);
}
}