* * 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:----roYBb3wHCoH2c1vav5SfhPRNGdsIU8BGYtY6FIaGLQPMh5G/8bTC6mk1TAB7S67Az68KEGNsLcX5djrn/V01Yk9TwcFujHfweldBUakoNIdqL9/Gg/lODJzE/ywOgjIkn6rwUA6HBIrT6pCbWwhFBQY3mAcmxkO/AbHGd4BbjkMEnN4h8vGyFZ7ALaqy00ftat7cdPToyF4nmh7fBTiXwl/boncFfgy1xO0tNJN6RftSsUXdw09+8m8i2RUmzJY1gMM0Gjo2BldIXfCO/VernEDwfnkIF6WDWPcFZnppuRqcofPNMCQiV7cAAzhaP6HS6fsSwUyvP9aGxeKvg294oMlybz70IhJJbBBZMmigtS1rRhO6d+DJJT9MTEqiRha3Ar4A+k0x+0p5v0klI59mgmCqKLsj0aKilg0yFpyKtU+8t+Hr/8MhYQng/97/QesRy4/1t/64EVwGasdn4h870D47BDV3VXX/hmP4roihBcipzvm8JKPAOiBYrVMc3HXNR6SS5cSY9FtsLJOTX9WVJEtkhqp0EcWzgNY+VvnvxIZnrnmMnC0HTmpG7EvBu7uvVTT3GZRf/hEqx1+8wBgoI0Mxc0+btTJqb/dtFaqknFo5LK65h7cuCeaWPxgJ0m35fhLeLcu2K7pR0050k4mUyZVHVgtKlCwZt4okWR2Wl7k=----ATTACHMENT:----NjY2MzMyNjU2MjE3MjM1NiA0OTYxNTc0MTk4Mzc2MDM2IDU1ODE2OTg3MDg3MjMyNTk=