Add RootController::StopWithCode()
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 8 Oct 2011 14:57:37 +0000 (10:57 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 8 Oct 2011 14:57:37 +0000 (10:57 -0400)
http/root_controller.php

index e95037a9c4b7ff7adc9ce0cb1fb3ee5539f4a2ae..c92e193309a3db35832b90a4878a4f21419e8c3e 100644 (file)
@@ -132,6 +132,15 @@ class RootController
     $this->_Exit();
   }
 
+  /*!
+    Sets the response code and stops the controller. Returns void.
+  */
+  public function StopWithCode($code)
+  {
+    $this->response->response_code = $code;
+    $this->Stop();
+  }
+
   /*!
     Wrapper around PHP exit().
   */