You are here

public function ChainDecoder::supportsDecoding in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Encoder/ChainDecoder.php \Symfony\Component\Serializer\Encoder\ChainDecoder::supportsDecoding()

Checks whether the deserializer can decode from given format.

Parameters

string $format format name:

Return value

bool

Overrides DecoderInterface::supportsDecoding

File

vendor/symfony/serializer/Encoder/ChainDecoder.php, line 44

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