You are here

class TestExtendedNormalizer in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TestExtendedNormalizer

Test normalizer with a different supported class.

Hierarchy

Expanded class hierarchy of TestExtendedNormalizer

File

core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php, line 118
Contains \Drupal\Tests\serialization\Unit\Normalizer\ComplexDataNormalizerTest.

Namespace

Drupal\Tests\serialization\Unit\Normalizer
View source
class TestExtendedNormalizer extends ComplexDataNormalizer {
  protected $supportedInterfaceOrClass = \stdClass::class;

}

Members

Namesort descending Modifiers Type Description Overrides
CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY constant Name of key for bubbling cacheability metadata via serialization context.
ComplexDataNormalizer::normalize public function Normalizes an object into a set of arrays/scalars. 7
NormalizerBase::$format protected property List of formats which supports (de-)normalization. 3
NormalizerBase::addCacheableDependency protected function Adds cacheability if applicable.
NormalizerBase::checkFormat protected function Checks if the provided format is supported by this normalizer. 2
NormalizerBase::supportsDenormalization public function Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization() 1
NormalizerBase::supportsNormalization public function Checks whether the given class is supported for normalization by this normalizer. 1
TestExtendedNormalizer::$supportedInterfaceOrClass protected property The interface or class that this Normalizer supports. Overrides ComplexDataNormalizer::$supportedInterfaceOrClass