SerializationServiceProvider.php in Drupal 10
Same filename and directory in other branches
Namespace
Drupal\serializationFile
core/modules/serialization/src/SerializationServiceProvider.phpView source
<?php
namespace Drupal\serialization;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderInterface;
/**
* Serialization dependency injection container.
*/
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());
}
}
Classes
Name | Description |
---|---|
SerializationServiceProvider | Serialization dependency injection container. |