Version 1
[yaffs-website] / web / core / modules / serialization / src / Normalizer / NullNormalizer.php
diff --git a/web/core/modules/serialization/src/Normalizer/NullNormalizer.php b/web/core/modules/serialization/src/Normalizer/NullNormalizer.php
new file mode 100644 (file)
index 0000000..dbc61f7
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+namespace Drupal\serialization\Normalizer;
+
+/**
+ * Null normalizer.
+ */
+class NullNormalizer extends NormalizerBase {
+
+  /**
+   * Constructs a NullNormalizer object.
+   *
+   * @param string|array $supported_interface_of_class
+   *   The supported interface(s) or class(es).
+   */
+  public function __construct($supported_interface_of_class) {
+    $this->supportedInterfaceOrClass = $supported_interface_of_class;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function normalize($object, $format = NULL, array $context = []) {
+    return NULL;
+  }
+
+}