2014-08-19 14:10:22 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Response {
|
|
|
|
private $_anvil;
|
|
|
|
|
|
|
|
public function __construct($a) {
|
|
|
|
$this->_anvil = $a;
|
|
|
|
}
|
|
|
|
|
2015-10-22 16:02:50 +00:00
|
|
|
public function badrequest($txt="Bad Request") {
|
|
|
|
header('HTTP/1.0 400 Bad Request');
|
|
|
|
echo $txt;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function notfound($txt="Page Not Found") {
|
|
|
|
header('HTTP/1.0 404 Not Found');
|
|
|
|
echo $txt;
|
|
|
|
}
|
|
|
|
|
2014-08-19 14:10:22 +00:00
|
|
|
public function redirect($url) {
|
|
|
|
header('Location: '.$url);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|