ContentHubCdfEncoder.php in Acquia Content Hub 8
Namespace
Drupal\acquia_contenthub\EncoderFile
src/Encoder/ContentHubCdfEncoder.phpView source
<?php
namespace Drupal\acquia_contenthub\Encoder;
use Symfony\Component\Serializer\Encoder\JsonEncoder as SymfonyJsonEncoder;
/**
* Encodes Content Hub CDF data in JSON.
*
* Simply respond to the acquia_contenthub_cdf format requests using the JSON
* encoder.
*/
class ContentHubCdfEncoder extends SymfonyJsonEncoder {
/**
* The formats that this Encoder supports.
*
* @var string
*/
protected $format = 'acquia_contenthub_cdf';
/**
* {@inheritdoc}
*/
public function supportsEncoding($format) {
return $format == $this->format;
}
/**
* {@inheritdoc}
*/
public function supportsDecoding($format) {
return $format == $this->format;
}
}
Classes
Name![]() |
Description |
---|---|
ContentHubCdfEncoder | Encodes Content Hub CDF data in JSON. |