Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 3 |
| SerializationServiceProvider | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
| register | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\serialization\SerializationServiceProvider. | |
| */ | |
| 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()); | |
| } | |
| } |