You are here

public function SerializationTestEncoder::supportsEncoding in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/serialization/tests/serialization_test/src/SerializationTestEncoder.php \Drupal\serialization_test\SerializationTestEncoder::supportsEncoding()

Checks whether the serializer can encode to given format.

Parameters

string $format format name:

Return value

bool

Overrides EncoderInterface::supportsEncoding

File

core/modules/serialization/tests/serialization_test/src/SerializationTestEncoder.php, line 32
Contains \Drupal\serialization_test\SerializationTestEncoder.

Class

SerializationTestEncoder

Namespace

Drupal\serialization_test

Code

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