fdd6b177abc852cbac14630b26d57ec063e5ba34
[yaffs-website] / web / core / modules / serialization / src / Normalizer / CacheableNormalizerInterface.php
1 <?php
2
3 namespace Drupal\serialization\Normalizer;
4
5 use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
6
7 /**
8  * Defines the interface for normalizers producing cacheable normalizations.
9  *
10  * @see cache
11  */
12 interface CacheableNormalizerInterface extends NormalizerInterface {
13
14   /**
15    * Name of key for bubbling cacheability metadata via serialization context.
16    *
17    * @see \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
18    * @see \Symfony\Component\Serializer\SerializerInterface::serialize()
19    * @see \Drupal\rest\EventSubscriber\ResourceResponseSubscriber::renderResponseBody()
20    */
21   const SERIALIZATION_CONTEXT_CACHEABILITY = 'cacheability';
22
23 }