Skip to content

Commit

Permalink
custom http status code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mashape committed Feb 2, 2011
1 parent 2fd63cc commit 1c93aba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mashape/mashape.php
Expand Up @@ -43,6 +43,12 @@ protected static function addError($code, $message) {
$e = new MashapeAPIError($code, $message);
array_push(self::$errors, $e);
}

public static function setHttpStatusCode($statusCode) {
if (!empty($statusCode)) {
header("HTTP/1.0 " . $statusCode);
}
}

public static function parseBoolean($value) {
if ($value == "1" || strtolower($value) === "true") {
Expand Down

0 comments on commit 1c93aba

Please sign in to comment.