You are here

public function JsonBlueprintDenormalizer::setSerializer in Subrequests 8.2

Same name and namespace in other branches
  1. 8 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 62

Class

JsonBlueprintDenormalizer
Denormalizer that builds the blueprint based on the incoming blueprint.

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;
}