Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ClassMetadataInterface.php

interface ClassMetadataInterface

Same name in this branch
  1. 11.1.x vendor/symfony/validator/Mapping/ClassMetadataInterface.php \Symfony\Component\Validator\Mapping\ClassMetadataInterface

Stores metadata needed for serializing and deserializing objects of specific class.

Primarily, the metadata stores the set of attributes to serialize or deserialize.

There may only exist one metadata for each attribute according to its name.

@internal

@author Kévin Dunglas <dunglas@gmail.com>

Hierarchy

  • interface \Symfony\Component\Serializer\Mapping\ClassMetadataInterface

Expanded class hierarchy of ClassMetadataInterface

All classes that implement ClassMetadataInterface

12 files declare their use of ClassMetadataInterface
AbstractObjectNormalizer.php in vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php
AttributeLoader.php in vendor/symfony/serializer/Mapping/Loader/AttributeLoader.php
CacheClassMetadataFactory.php in vendor/symfony/serializer/Mapping/Factory/CacheClassMetadataFactory.php
ClassMetadataFactory.php in vendor/symfony/serializer/Mapping/Factory/ClassMetadataFactory.php
ClassMetadataFactoryCompiler.php in vendor/symfony/serializer/Mapping/Factory/ClassMetadataFactoryCompiler.php

... See full list

File

vendor/symfony/serializer/Mapping/ClassMetadataInterface.php, line 25

Namespace

Symfony\Component\Serializer\Mapping
View source
interface ClassMetadataInterface {
    
    /**
     * Returns the name of the backing PHP class.
     */
    public function getName() : string;
    
    /**
     * Adds an {@link AttributeMetadataInterface}.
     */
    public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata) : void;
    
    /**
     * Gets the list of {@link AttributeMetadataInterface}.
     *
     * @return array<string, AttributeMetadataInterface>
     */
    public function getAttributesMetadata() : array;
    
    /**
     * Merges a {@link ClassMetadataInterface} in the current one.
     */
    public function merge(self $classMetadata) : void;
    
    /**
     * Returns a {@link \ReflectionClass} instance for this class.
     */
    public function getReflectionClass() : \ReflectionClass;
    public function getClassDiscriminatorMapping() : ?ClassDiscriminatorMapping;
    public function setClassDiscriminatorMapping(?ClassDiscriminatorMapping $mapping) : void;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
ClassMetadataInterface::addAttributeMetadata public function Adds an {@link AttributeMetadataInterface}. 1
ClassMetadataInterface::getAttributesMetadata public function Gets the list of {@link AttributeMetadataInterface}. 1
ClassMetadataInterface::getClassDiscriminatorMapping public function 1
ClassMetadataInterface::getName public function Returns the name of the backing PHP class. 1
ClassMetadataInterface::getReflectionClass public function Returns a {@link \ReflectionClass} instance for this class. 1
ClassMetadataInterface::merge public function Merges a {@link ClassMetadataInterface} in the current one. 1
ClassMetadataInterface::setClassDiscriminatorMapping public function 1

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal