You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
378 B
24 lines
378 B
<?php
|
|
|
|
namespace App\Http;
|
|
|
|
class HttpResponse {
|
|
private int $code;
|
|
|
|
/**
|
|
* @param int $code
|
|
*/
|
|
public function __construct(int $code) {
|
|
$this->code = $code;
|
|
}
|
|
|
|
public function getCode(): int {
|
|
return $this->code;
|
|
}
|
|
|
|
public static function fromCode(int $code): HttpResponse {
|
|
return new HttpResponse($code);
|
|
}
|
|
|
|
}
|