You are here

public function XmlEncoder::supportsDecoding in Zircon Profile 8

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

Checks whether the deserializer can decode from given format.

Parameters

string $format format name:

Return value

bool

Overrides DecoderInterface::supportsDecoding

File

core/modules/serialization/src/Encoder/XmlEncoder.php, line 83
Contains \Drupal\serialization\Encoder\XmlEncoder.

Class

XmlEncoder
Adds XML support for serializer.

Namespace

Drupal\serialization\Encoder

Code

public function supportsDecoding($format) {
  return in_array($format, static::$format);
}