| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Lines | 13 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | View Code Duplication | public function redirect($url, $code = 302) |
|
| 22 | { |
||
| 23 | switch ($code) { |
||
| 24 | case 301: |
||
| 25 | header('HTTP/1.1 301 Moved Permanently'); |
||
| 26 | break; |
||
| 27 | case 302: |
||
| 28 | header('HTTP/1.1 302 Moved Temporarily'); |
||
| 29 | break; |
||
| 30 | } |
||
| 31 | header('Location: ' . $url); |
||
| 32 | $this->response->send(); |
||
| 33 | } |
||
| 34 | |||
| 57 | } |