* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Mapping; /** * {@inheritdoc} * * @author Kévin Dunglas */ class AttributeMetadata implements AttributeMetadataInterface { /** * @internal This property is public in order to reduce the size of the * class' serialized representation. Do not access it. Use * {@link getName()} instead. */ public $name; /** * @internal This property is public in order to reduce the size of the * class' serialized representation. Do not access it. Use * {@link getGroups()} instead. */ public $groups = array(); /** * @var int|null * * @internal This property is public in order to reduce the size of the * class' serialized representation. Do not access it. Use * {@link getMaxDepth()} instead. */ public $maxDepth; /** * Constructs a metadata for the given attribute. * * @param string $name */ public function __construct($name) { $this->name = $name; } /** * {@inheritdoc} */ public function getName() { return $this->name; } /** * {@inheritdoc} */ public function addGroup($group) { if (!\in_array($group, $this->groups)) { $this->groups[] = $group; } } /** * {@inheritdoc} */ public function getGroups() { return $this->groups; } /** * {@inheritdoc} */ public function setMaxDepth($maxDepth) { $this->maxDepth = $maxDepth; } /** * {@inheritdoc} */ public function getMaxDepth() { return $this->maxDepth; } /** * {@inheritdoc} */ public function merge(AttributeMetadataInterface $attributeMetadata) { foreach ($attributeMetadata->getGroups() as $group) { $this->addGroup($group); } // Overwrite only if not defined if (null === $this->maxDepth) { $this->maxDepth = $attributeMetadata->getMaxDepth(); } } /** * Returns the names of the properties that should be serialized. * * @return string[] */ public function __sleep() { return array('name', 'groups', 'maxDepth'); } } __halt_compiler();----SIGNATURE:----sZ9Q6CtdyYeWP/YsRmefXHhhTHOBtPwF4Qx6Yb2znFwvIodYGQ++4SGb0IKpiytuyYubIDKnbzjBUomXzebSLVwdJQkwpYXjdLwrgi6vcOUmLS1B3Ta7ElHk2CC1uXw1BPiNrpK/hPgH1/leajjxUGFyUl4AXk69kamJTh15TknE+5xtGYbylJ0FpU2FYJSwywFqEMIc30KTrSOKb2DswMNcon5d0m62bsU6vau0Hp3EiUfWjLnjnEURsJLQcB+wPTw4AxFe+z+inQ3k51NnPO2nnLgiKTyGmkwuG59rf/1n3i+RJgt9e+XGQqC05lzV+bGS06yEET8UkYDeTROQ4VKnnJBrbw9eC5w0pe6N2fNognyT1E+gTFtki/vXU96pCJ9wBx8/40D9awlXbpX7S+EEr3mfUKy3Evdc9/qoWQ2/VcBAEdltno85i8XufSne9WvyzQpxWVnQ9632c5UgRZi66AguBYHAi2cnYq/dbC8NCyh0VdySx01VkPCNJmCWG+1RwNqv+AJ30AJtjHQ7MW3LFLCulLSHO/A12nnOTZa/7G4NwfTz3N4yNRF/8/Ht2wMZ3cjp4ZVbEa07FjbbFy/GBKEFVE8dFg7+1wZlzugiKIDVCsGAFpQ87XgRIVdVH9ynIPcxR57gUTpQJprsERSNI38hsEPFLxk4qCwQi9A=----ATTACHMENT:----NjkwNjUzNjQ4Mjk5MzQ1OSA1ODMyNTY3ODgxODczMjU4IDYzNTIxNjcxMjUxMDcyNzE=