public function XmlEncoder::supportsEncoding

Same name in this branch
  1. 8.x drupal/core/modules/serialization/lib/Drupal/serialization/Encoder/XmlEncoder.php \Drupal\serialization\Encoder\XmlEncoder::supportsEncoding()
  2. 8.x drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/XmlEncoder.php \Symfony\Component\Serializer\Encoder\XmlEncoder::supportsEncoding()

Checks whether the serializer can encode to given format

Parameters

string $format format name:

Return value

Boolean

Overrides EncoderInterface::supportsEncoding

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/XmlEncoder.php, line 114

Class

XmlEncoder
Encodes XML data

Namespace

Symfony\Component\Serializer\Encoder

Code

public function supportsEncoding($format) {
  return 'xml' === $format;
}