You are here

public function JsonEncoder::supportsEncoding in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/serializer/Encoder/JsonEncoder.php \Symfony\Component\Serializer\Encoder\JsonEncoder::supportsEncoding()
  2. 8 core/modules/hal/src/Encoder/JsonEncoder.php \Drupal\hal\Encoder\JsonEncoder::supportsEncoding()
  3. 8 core/modules/serialization/src/Encoder/JsonEncoder.php \Drupal\serialization\Encoder\JsonEncoder::supportsEncoding()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Encoder/JsonEncoder.php \Symfony\Component\Serializer\Encoder\JsonEncoder::supportsEncoding()

Checks whether the serializer can encode to given format.

Parameters

string $format format name:

Return value

bool

Overrides EncoderInterface::supportsEncoding

2 methods override JsonEncoder::supportsEncoding()
JsonEncoder::supportsEncoding in core/modules/serialization/src/Encoder/JsonEncoder.php
Checks whether the serializer can encode to given format.
JsonEncoder::supportsEncoding in core/modules/hal/src/Encoder/JsonEncoder.php
Checks whether the serializer can encode to given format.

File

vendor/symfony/serializer/Encoder/JsonEncoder.php, line 86

Class

JsonEncoder
Encodes JSON data.

Namespace

Symfony\Component\Serializer\Encoder

Code

public function supportsEncoding($format) {
  return self::FORMAT === $format;
}