public function ChainDecoder::supportsDecoding

Checks whether the serializer can decode from given format

Parameters

string $format format name:

Return value

Boolean

Overrides DecoderInterface::supportsDecoding

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainDecoder.php, line 45

Class

ChainDecoder
Decoder delegating the decoding to a chain of decoders.

Namespace

Symfony\Component\Serializer\Encoder

Code

public function supportsDecoding($format) {
  try {
    $this
      ->getDecoder($format);
  } catch (RuntimeException $e) {
    return false;
  }
  return true;
}