function ContextBuilderTrait::with
72 calls to ContextBuilderTrait::with()
- AbstractNormalizerContextBuilder::withAllowExtraAttributes in vendor/
symfony/ serializer/ Context/ Normalizer/ AbstractNormalizerContextBuilder.php - If AbstractNormalizer::ATTRIBUTES are specified, and the source has fields that are not part of that list, configures whether to ignore those attributes or throw an ExtraAttributesException.
- AbstractNormalizerContextBuilder::withAttributes in vendor/
symfony/ serializer/ Context/ Normalizer/ AbstractNormalizerContextBuilder.php - Configures attributes to (de)normalize.
- AbstractNormalizerContextBuilder::withCallbacks in vendor/
symfony/ serializer/ Context/ Normalizer/ AbstractNormalizerContextBuilder.php - Configures an hashmap of field name => callable to normalize this field.
- AbstractNormalizerContextBuilder::withCircularReferenceHandler in vendor/
symfony/ serializer/ Context/ Normalizer/ AbstractNormalizerContextBuilder.php - Configures an handler to call when a circular reference has been detected.
- AbstractNormalizerContextBuilder::withCircularReferenceLimit in vendor/
symfony/ serializer/ Context/ Normalizer/ AbstractNormalizerContextBuilder.php - Configures how many loops of circular reference to allow while normalizing.
File
-
vendor/
symfony/ serializer/ Context/ ContextBuilderTrait.php, line 24
Class
- ContextBuilderTrait
- @author Mathias Arlaud <mathias.arlaud@gmail.com>
Namespace
Symfony\Component\Serializer\ContextCode
protected function with(string $key, mixed $value) : static {
$instance = new static();
$instance->context = array_merge($this->context, [
$key => $value,
]);
return $instance;
}