Add support for getting request status

pull/136/head
kafene 11 years ago
parent 71f66b4d5d
commit 3392751dba

@ -83,7 +83,11 @@ class Response {
* @return object Self reference
* @throws \Exception If invalid status code
*/
public function status($code) {
public function status($code = null) {
if ($code === null) {
return $this->status;
}
if (array_key_exists($code, self::$codes)) {
$this->status = $code;
}

Loading…
Cancel
Save