Mercurial > hg > isophonics-drupal-site
comparison core/modules/serialization/src/SerializationServiceProvider.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\serialization; | |
4 | |
5 use Drupal\Core\DependencyInjection\ContainerBuilder; | |
6 use Drupal\Core\DependencyInjection\ServiceProviderInterface; | |
7 | |
8 /** | |
9 * Serialization dependency injection container. | |
10 */ | |
11 class SerializationServiceProvider implements ServiceProviderInterface { | |
12 | |
13 /** | |
14 * {@inheritdoc} | |
15 */ | |
16 public function register(ContainerBuilder $container) { | |
17 // Add a compiler pass for adding Normalizers and Encoders to Serializer. | |
18 $container->addCompilerPass(new RegisterSerializationClassesCompilerPass()); | |
19 // Add a compiler pass for adding concrete Resolvers to chain Resolver. | |
20 $container->addCompilerPass(new RegisterEntityResolversCompilerPass()); | |
21 } | |
22 | |
23 } |