abstract class JsonldNormalizerBase

Provide a base class for JSON-LD Normalizers.

Hierarchy

Expanded class hierarchy of JsonldNormalizerBase

3 files declare their use of JsonldNormalizerBase

File

drupal/core/modules/jsonld/lib/Drupal/jsonld/JsonldNormalizerBase.php, line 18
Definition of Drupal\jsonld\JsonldNormalizerBase.

Namespace

Drupal\jsonld
View source
abstract class JsonldNormalizerBase extends SerializerAwareNormalizer implements NormalizerInterface {

  /**
   * The formats that this Normalizer supports.
   *
   * @var array
   */
  protected static $format = array(
    'jsonld',
    'drupal_jsonld',
  );

  /**
   * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
   */
  public function supportsNormalization($data, $format = NULL) {
    return is_object($data) && in_array($format, static::$format);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
JsonldNormalizerBase::$format protected static property The formats that this Normalizer supports.
JsonldNormalizerBase::supportsNormalization public function Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize() Overrides NormalizerInterface::supportsNormalization 3
NormalizerInterface::normalize public function Normalizes an object into a set of arrays/scalars 7
SerializerAwareNormalizer::$serializer protected property
SerializerAwareNormalizer::setSerializer public function Sets the owning Serializer object Overrides SerializerAwareInterface::setSerializer