src/ObjectResult/ObjectError.php 1 location
|
@@ 75-83 (lines=9) @@
|
| 72 |
|
* |
| 73 |
|
* @return Object $this |
| 74 |
|
*/ |
| 75 |
|
public function setStatusCode($code) { |
| 76 |
|
|
| 77 |
|
$code = filter_var($code, FILTER_VALIDATE_INT); |
| 78 |
|
|
| 79 |
|
$this->code = in_array($code, $this->supported_error_codes) ? $code : $this->code; |
| 80 |
|
|
| 81 |
|
return $this; |
| 82 |
|
|
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
/** |
| 86 |
|
* Get status code |
src/ObjectResult/ObjectRedirect.php 1 location
|
@@ 71-79 (lines=9) @@
|
| 68 |
|
* |
| 69 |
|
* @return Object $this |
| 70 |
|
*/ |
| 71 |
|
public function setStatusCode($code) { |
| 72 |
|
|
| 73 |
|
$code = filter_var($code, FILTER_VALIDATE_INT); |
| 74 |
|
|
| 75 |
|
$this->code = in_array($code, $this->supported_redirect_codes) ? $code : $this->code; |
| 76 |
|
|
| 77 |
|
return $this; |
| 78 |
|
|
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
/** |
| 82 |
|
* Get status code |
src/ObjectResult/ObjectSuccess.php 1 location
|
@@ 75-83 (lines=9) @@
|
| 72 |
|
* |
| 73 |
|
* @return Object $this |
| 74 |
|
*/ |
| 75 |
|
public function setStatusCode($code) { |
| 76 |
|
|
| 77 |
|
$code = filter_var($code, FILTER_VALIDATE_INT); |
| 78 |
|
|
| 79 |
|
$this->code = in_array($code, $this->supported_success_codes) ? $code : $this->code; |
| 80 |
|
|
| 81 |
|
return $this; |
| 82 |
|
|
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
/** |
| 86 |
|
* Get status code |
src/ObjectRoute/ObjectRoute.php 2 locations
|
@@ 151-159 (lines=9) @@
|
| 148 |
|
|
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
public function setRedirectCode($code) { |
| 152 |
|
|
| 153 |
|
$code = filter_var($code, FILTER_VALIDATE_INT); |
| 154 |
|
|
| 155 |
|
$this->redirect_code = in_array($code, $this->supported_redirect_codes) ? $code : $this->redirect_code; |
| 156 |
|
|
| 157 |
|
return $this; |
| 158 |
|
|
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
public function getRedirectCode() { |
| 162 |
|
|
|
@@ 167-175 (lines=9) @@
|
| 164 |
|
|
| 165 |
|
} |
| 166 |
|
|
| 167 |
|
public function setErrorCode($code) { |
| 168 |
|
|
| 169 |
|
$code = filter_var($code, FILTER_VALIDATE_INT); |
| 170 |
|
|
| 171 |
|
$this->error_code = in_array($code, $this->supported_error_codes) ? $code : $this->error_code; |
| 172 |
|
|
| 173 |
|
return $this; |
| 174 |
|
|
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
public function getErrorCode() { |
| 178 |
|
|
src/Service/Service.php 1 location
|
@@ 373-381 (lines=9) @@
|
| 370 |
|
* @param integer $code HTTP status code (in case of success) |
| 371 |
|
* @return Object $this |
| 372 |
|
*/ |
| 373 |
|
final public function setStatusCode($code) { |
| 374 |
|
|
| 375 |
|
$code = filter_var($code, FILTER_VALIDATE_INT); |
| 376 |
|
|
| 377 |
|
$this->status_code = in_array($code, $this->supported_success_codes) ? $code : $this->status_code; |
| 378 |
|
|
| 379 |
|
return $this; |
| 380 |
|
|
| 381 |
|
} |
| 382 |
|
|
| 383 |
|
/** |
| 384 |
|
* Get service-defined status code |