You are here

public function JsonBlueprintDenormalizer::setSerializer in Subrequests 8

Same name and namespace in other branches
  1. 8.2 src/Normalizer/JsonBlueprintDenormalizer.php \Drupal\subrequests\Normalizer\JsonBlueprintDenormalizer::setSerializer()
  2. 3.x src/Normalizer/JsonBlueprintDenormalizer.php \Drupal\subrequests\Normalizer\JsonBlueprintDenormalizer::setSerializer()

File

src/Normalizer/JsonBlueprintDenormalizer.php, line 23

Class

JsonBlueprintDenormalizer

Namespace

Drupal\subrequests\Normalizer

Code

public function setSerializer(SerializerInterface $serializer) {
  if (!is_a($serializer, Serializer::class)) {
    throw new \ErrorException('Serializer is unable to normalize or denormalize.');
  }
  $this->serializer = $serializer;
}