You are here

public function JsonSubrequestDenormalizer::supportsDenormalization in Subrequests 8

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

Checks whether the given class is supported for denormalization by this normalizer.

Parameters

mixed $data Data to denormalize from:

string $type The class to which the data should be denormalized:

string $format The format being deserialized from:

Return value

bool

File

src/Normalizer/JsonSubrequestDenormalizer.php, line 86

Class

JsonSubrequestDenormalizer

Namespace

Drupal\subrequests\Normalizer

Code

public function supportsDenormalization($data, $type, $format = NULL) {
  return $format === 'json' && $type === Request::class && is_array($data) && JsonBlueprintDenormalizer::arrayIsKeyed($data);
}