Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ChainEncoder.php

function ChainEncoder::supportsEncoding

Overrides ContextAwareEncoderInterface::supportsEncoding

File

vendor/symfony/serializer/Encoder/ChainEncoder.php, line 46

Class

ChainEncoder
Encoder delegating the decoding to a chain of encoders.

Namespace

Symfony\Component\Serializer\Encoder

Code

public function supportsEncoding(string $format, array $context = []) : bool {
    try {
        $this->getEncoder($format, $context);
    } catch (RuntimeException) {
        return false;
    }
    return true;
}
RSS feed
Powered by Drupal