* * 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 ClassMetadata implements ClassMetadataInterface { /** * @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; /** * @var AttributeMetadataInterface[] * * @internal This property is public in order to reduce the size of the * class' serialized representation. Do not access it. Use * {@link getAttributesMetadata()} instead. */ public $attributesMetadata = array(); /** * @var \ReflectionClass */ private $reflClass; /** * Constructs a metadata for the given class. * * @param string $class */ public function __construct($class) { $this->name = $class; } /** * {@inheritdoc} */ public function getName() { return $this->name; } /** * {@inheritdoc} */ public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata) { $this->attributesMetadata[$attributeMetadata->getName()] = $attributeMetadata; } /** * {@inheritdoc} */ public function getAttributesMetadata() { return $this->attributesMetadata; } /** * {@inheritdoc} */ public function merge(ClassMetadataInterface $classMetadata) { foreach ($classMetadata->getAttributesMetadata() as $attributeMetadata) { if (isset($this->attributesMetadata[$attributeMetadata->getName()])) { $this->attributesMetadata[$attributeMetadata->getName()]->merge($attributeMetadata); } else { $this->addAttributeMetadata($attributeMetadata); } } } /** * {@inheritdoc} */ public function getReflectionClass() { if (!$this->reflClass) { $this->reflClass = new \ReflectionClass($this->getName()); } return $this->reflClass; } /** * Returns the names of the properties that should be serialized. * * @return string[] */ public function __sleep() { return array( 'name', 'attributesMetadata', ); } } __halt_compiler();----SIGNATURE:----dckewSGacV23kNeXU0TbaCyX8t9fqmGWDLAMB6pjxJrj9oWl4Gt6/9WkOSRNZrztnQCqG9/Pa67jtUKhqd53C0dUC9eMu8sMUBKrIgrRz8YathzfAFXM7HqCVow05wdee/UJL7NDa7Is879RkNsBSp1XiamccMnkK1lZe+9nLvy7LjUnHXF40kvR5ZSDbgBGrskYhTeKOQZvMuFmGIIQGmiI5s1IVUcFWMEjipg+AHMqyu/R2vw553BmYAS5K/aIU96E/Xzy0x00IiQwj2M0rZBu3jPuDj1kGFDA2gWpiBVbi10WhO/dnJ7I28uYyPpMin+z1BHGqm+Z53xyszbP3K4DhIWij+IN56dqKSum9uhQ9BoySMiBagLzQwfkTPOHrm/QYQMKsjNuS3/aUi9tBIOJime0ieysKVN/xSFwu2e9HB4iXz0j8eY8qXXuE9FPhlNBVvesNtFYdRkv+4BkhwZkumZn/YDq5sK/5mYhmVizHUGksufjdEmPe43iyiCDK67IV58cbDL0qi7iDvO9fMpfHdvSXUBHOEI0uh/l6N1L9ysyC3QPkIETCnJScHM7qxW8lONdgx3agAJAY4/Vbhb44XC1L2d5vesT+frM0/WkDb/FDEqy8n9CowqB8Sz6ig8IsKc8E76tL/VJgnLUf28qRhIMsbiU7FnldT/Uv4k=----ATTACHMENT:----NzU2NzIzNjA2ODk4NzkwNSA4MTU2ODc2MDAyMTgyODAxIDk4OTQyOTk3Nzc4MDY1Nzk=