A helper providing autocompletion for available JsonSerializableNormalizer options.
- author Mathias Arlaud
Methods |
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::toArray() : array
|
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withAllowExtraAttributes(?bool $allowExtraAttributes) : static If AbstractNormalizer::ATTRIBUTES are specified, and the source has fields that are not part of that list, |
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withAttributes(?array $attributes) : static Configures attributes to (de)normalize. For nested structures, this list needs to reflect the object tree. Eg: ['foo', 'bar', 'object' => ['baz']]
|
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withCallbacks(?array $callbacks) : static Configures an hashmap of field name => callable to normalize this field. The callable is called if the field is encountered with the arguments:
|
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withCircularReferenceHandler(?callable $circularReferenceHandler) : static Configures an handler to call when a circular reference has been detected. If no handler is specified, a CircularReferenceException is thrown. The method will be called with ($object, $format, $context) and its |
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withCircularReferenceLimit(?int $circularReferenceLimit) : static Configures how many loops of circular reference to allow while normalizing. The value 1 means that when we encounter the same object a You can raise this value for special cases, e.g. in combination with the Must be strictly positive.
|
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withContext(Symfony
|
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withDefaultContructorArguments(?array $defaultContructorArguments) : static Configures an hashmap of classes containing hashmaps of constructor argument => default value. The names need to match the parameter names in the constructor arguments. Eg: [Foo::class => ['foo' => true, 'bar' => 0]]
|
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withGroups(array|string|?null $groups) : static Configures groups containing attributes to (de)normalize. Eg: ['group1', 'group2']
|
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withIgnoredAttributes(?array $ignoredAttributes) : static Configures attributes to be skipped when normalizing an object tree. This list is applied to each element of nested structures. Eg: ['foo', 'bar'] Note: The behaviour for nested structures is different from ATTRIBUTES
|
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withObjectToPopulate(?object $objectToPopulate) : static Configures an object to be updated instead of creating a new instance. If you have a nested structure, child objects will be overwritten with |
public Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::withRequireAllProperties(?bool $requireAllProperties = true) : static Configures requiring all properties to be listed in the input instead |
Methods |
protected Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder::with(string $key, ?mixed $value) : static |