interface AttributeMetadataInterface
Stores metadata needed for serializing and deserializing attributes.
Primarily, the metadata stores serialization groups.
@internal
@author Kévin Dunglas <dunglas@gmail.com>
Hierarchy
- interface \Symfony\Component\Serializer\Mapping\AttributeMetadataInterface
Expanded class hierarchy of AttributeMetadataInterface
All classes that implement AttributeMetadataInterface
3 files declare their use of AttributeMetadataInterface
- AbstractNormalizer.php in vendor/
symfony/ serializer/ Normalizer/ AbstractNormalizer.php - AbstractObjectNormalizer.php in vendor/
symfony/ serializer/ Normalizer/ AbstractObjectNormalizer.php - AttributeLoader.php in vendor/
symfony/ serializer/ Mapping/ Loader/ AttributeLoader.php
File
-
vendor/
symfony/ serializer/ Mapping/ AttributeMetadataInterface.php, line 25
Namespace
Symfony\Component\Serializer\MappingView source
interface AttributeMetadataInterface {
/**
* Gets the attribute name.
*/
public function getName() : string;
/**
* Adds this attribute to the given group.
*/
public function addGroup(string $group) : void;
/**
* Gets groups of this attribute.
*
* @return string[]
*/
public function getGroups() : array;
/**
* Sets the serialization max depth for this attribute.
*/
public function setMaxDepth(?int $maxDepth) : void;
/**
* Gets the serialization max depth for this attribute.
*/
public function getMaxDepth() : ?int;
/**
* Sets the serialization name for this attribute.
*/
public function setSerializedName(?string $serializedName) : void;
/**
* Gets the serialization name for this attribute.
*/
public function getSerializedName() : ?string;
public function setSerializedPath(?PropertyPath $serializedPath) : void;
public function getSerializedPath() : ?PropertyPath;
/**
* Sets if this attribute must be ignored or not.
*/
public function setIgnore(bool $ignore) : void;
/**
* Gets if this attribute is ignored or not.
*/
public function isIgnored() : bool;
/**
* Merges an {@see AttributeMetadataInterface} with in the current one.
*/
public function merge(self $attributeMetadata) : void;
/**
* Gets all the normalization contexts per group ("*" being the base context applied to all groups).
*/
public function getNormalizationContexts() : array;
/**
* Gets the computed normalization contexts for given groups.
*/
public function getNormalizationContextForGroups(array $groups) : array;
/**
* Sets the normalization context for given groups.
*/
public function setNormalizationContextForGroups(array $context, array $groups = []) : void;
/**
* Gets all the denormalization contexts per group ("*" being the base context applied to all groups).
*/
public function getDenormalizationContexts() : array;
/**
* Gets the computed denormalization contexts for given groups.
*/
public function getDenormalizationContextForGroups(array $groups) : array;
/**
* Sets the denormalization context for given groups.
*/
public function setDenormalizationContextForGroups(array $context, array $groups = []) : void;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
AttributeMetadataInterface::addGroup | public | function | Adds this attribute to the given group. | 1 |
AttributeMetadataInterface::getDenormalizationContextForGroups | public | function | Gets the computed denormalization contexts for given groups. | 1 |
AttributeMetadataInterface::getDenormalizationContexts | public | function | Gets all the denormalization contexts per group ("*" being the base context applied to all groups). | 1 |
AttributeMetadataInterface::getGroups | public | function | Gets groups of this attribute. | 1 |
AttributeMetadataInterface::getMaxDepth | public | function | Gets the serialization max depth for this attribute. | 1 |
AttributeMetadataInterface::getName | public | function | Gets the attribute name. | 1 |
AttributeMetadataInterface::getNormalizationContextForGroups | public | function | Gets the computed normalization contexts for given groups. | 1 |
AttributeMetadataInterface::getNormalizationContexts | public | function | Gets all the normalization contexts per group ("*" being the base context applied to all groups). | 1 |
AttributeMetadataInterface::getSerializedName | public | function | Gets the serialization name for this attribute. | 1 |
AttributeMetadataInterface::getSerializedPath | public | function | 1 | |
AttributeMetadataInterface::isIgnored | public | function | Gets if this attribute is ignored or not. | 1 |
AttributeMetadataInterface::merge | public | function | Merges an { | 1 |
AttributeMetadataInterface::setDenormalizationContextForGroups | public | function | Sets the denormalization context for given groups. | 1 |
AttributeMetadataInterface::setIgnore | public | function | Sets if this attribute must be ignored or not. | 1 |
AttributeMetadataInterface::setMaxDepth | public | function | Sets the serialization max depth for this attribute. | 1 |
AttributeMetadataInterface::setNormalizationContextForGroups | public | function | Sets the normalization context for given groups. | 1 |
AttributeMetadataInterface::setSerializedName | public | function | Sets the serialization name for this attribute. | 1 |
AttributeMetadataInterface::setSerializedPath | public | function | 1 |