class SerializationServiceProvider in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/serialization/src/SerializationServiceProvider.php \Drupal\serialization\SerializationServiceProvider
Serialization dependency injection container.
Hierarchy
- class \Drupal\serialization\SerializationServiceProvider implements ServiceProviderInterface
Expanded class hierarchy of SerializationServiceProvider
File
- core/
modules/ serialization/ src/ SerializationServiceProvider.php, line 16 - Contains \Drupal\serialization\SerializationServiceProvider.
Namespace
Drupal\serializationView source
class SerializationServiceProvider implements ServiceProviderInterface {
/**
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
// Add a compiler pass for adding Normalizers and Encoders to Serializer.
$container
->addCompilerPass(new RegisterSerializationClassesCompilerPass());
// Add a compiler pass for adding concrete Resolvers to chain Resolver.
$container
->addCompilerPass(new RegisterEntityResolversCompilerPass());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SerializationServiceProvider:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |