| 1 | <?php | ||
| 9 | final class Context implements JsonSerializable | ||
| 10 | { | ||
| 11 | /** | ||
| 12 | * @var mixed[]|null | ||
| 13 | */ | ||
| 14 | private $custom; | ||
| 15 | |||
| 16 | /** | ||
| 17 | * @var Response|null | ||
| 18 | */ | ||
| 19 | private $response; | ||
| 20 | |||
| 21 | /** | ||
| 22 | * @var Request|null | ||
| 23 | */ | ||
| 24 | private $request; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * @var string[] | ||
| 28 | */ | ||
| 29 | private $tagList = []; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * @var User|null | ||
| 33 | */ | ||
| 34 | private $user; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * @param mixed $value | ||
| 38 | */ | ||
| 39 | 2 | public function withCustomVariable(string $name, $value): self | |
| 46 | |||
| 47 | 5 | public function getResponse(): ?Response | |
| 51 | |||
| 52 | 6 | public function withResponse(Response $response): self | |
| 59 | |||
| 60 | 5 | public function getRequest(): ?Request | |
| 64 | |||
| 65 | 19 | public function withRequest(Request $request): self | |
| 72 | |||
| 73 | 83 | public function withTag(string $tag, string $value): self | |
| 80 | |||
| 81 | 1 | public function withUser(User $user): self | |
| 88 | |||
| 89 | /** | ||
| 90 | * @return mixed[] | ||
| 91 | */ | ||
| 92 | 46 | public function jsonSerialize(): array | |
| 102 | } | ||
| 103 |