function SerializerPass::bindDefaultContext
2 calls to SerializerPass::bindDefaultContext()
- SerializerPass::configureNamedSerializers in vendor/
symfony/ serializer/ DependencyInjection/ SerializerPass.php - SerializerPass::process in vendor/
symfony/ serializer/ DependencyInjection/ SerializerPass.php - You can modify the container here before it is dumped to PHP code.
File
-
vendor/
symfony/ serializer/ DependencyInjection/ SerializerPass.php, line 100
Class
- SerializerPass
- Adds all services with the tags "serializer.encoder" and "serializer.normalizer" as encoders and normalizers to the "serializer" service.
Namespace
Symfony\Component\Serializer\DependencyInjectionCode
private function bindDefaultContext(ContainerBuilder $container, array $services, array $defaultContext) : void {
foreach ($services as $id) {
$definition = $container->getDefinition((string) $id);
$definition->setBindings([
'array $defaultContext' => new BoundArgument($defaultContext, false),
] + $definition->getBindings());
}
}