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 core/modules/hal/src/Encoder/JsonEncoder.php \Drupal\hal\Encoder\JsonEncoder::supportsEncoding()

Checks whether the serializer can encode to given format.

Parameters

string $format format name:

Return value

bool

Overrides JsonEncoder::supportsEncoding

File

core/modules/hal/src/Encoder/JsonEncoder.php, line 29
Contains \Drupal\hal\Encoder\JsonEncoder.

Class

JsonEncoder
Encodes HAL data in JSON.

Namespace

Drupal\hal\Encoder

Code

public function supportsEncoding($format) {
  return $format == $this->format;
}