| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
namespace Symfony\Component\Serializer\Context\Normalizer; |
| 13 |
|
| 14 |
use Symfony\Component\Serializer\Context\ContextBuilderInterface; |
| 15 |
use Symfony\Component\Serializer\Context\ContextBuilderTrait; |
| 16 |
use Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer; |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
final class ConstraintViolationListNormalizerContextBuilder implements ContextBuilderInterface |
| 24 |
{ |
| 25 |
use ContextBuilderTrait; |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
public function withInstance(mixed $instance): static |
| 31 |
{ |
| 32 |
return $this->with(ConstraintViolationListNormalizer::INSTANCE, $instance); |
| 33 |
} |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
public function withStatus(?int $status): static |
| 39 |
{ |
| 40 |
return $this->with(ConstraintViolationListNormalizer::STATUS, $status); |
| 41 |
} |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
public function withTitle(?string $title): static |
| 47 |
{ |
| 48 |
return $this->with(ConstraintViolationListNormalizer::TITLE, $title); |
| 49 |
} |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
public function withType(?string $type): static |
| 55 |
{ |
| 56 |
return $this->with(ConstraintViolationListNormalizer::TYPE, $type); |
| 57 |
} |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
public function withPayloadFields(?array $payloadFields): static |
| 68 |
{ |
| 69 |
return $this->with(ConstraintViolationListNormalizer::PAYLOAD_FIELDS, $payloadFields); |
| 70 |
} |
| 71 |
} |