3 namespace Drupal\hal\Normalizer;
5 use Drupal\serialization\Normalizer\NormalizerBase as SerializationNormalizerBase;
6 use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
9 * Base class for Normalizers.
11 abstract class NormalizerBase extends SerializationNormalizerBase implements DenormalizerInterface {
16 protected $format = ['hal_json'];
21 protected function checkFormat($format = NULL) {
22 if (isset($this->formats)) {
23 @trigger_error('::formats is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Use ::$format instead. See https://www.drupal.org/node/2868275', E_USER_DEPRECATED);
25 $this->format = $this->formats;
28 return parent::checkFormat($format);