| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
namespace Symfony\Component\Serializer\Context; |
| 13 |
|
| 14 |
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; |
| 15 |
use Symfony\Component\Serializer\Serializer; |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
final class SerializerContextBuilder implements ContextBuilderInterface |
| 23 |
{ |
| 24 |
use ContextBuilderTrait; |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
public function withEmptyArrayAsObject(?bool $emptyArrayAsObject): static |
| 31 |
{ |
| 32 |
return $this->with(Serializer::EMPTY_ARRAY_AS_OBJECT, $emptyArrayAsObject); |
| 33 |
} |
| 34 |
|
| 35 |
public function withCollectDenormalizationErrors(?bool $collectDenormalizationErrors): static |
| 36 |
{ |
| 37 |
return $this->with(DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS, $collectDenormalizationErrors); |
| 38 |
} |
| 39 |
} |