* * 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:----bcN/desNrbjZIlbwSB9qAP7OSzKy6IwQ0j/juWQHwV5OQnNwsnmZHt+BdXO3wkS0RdcgKdnjntiv6dHKlHMv7VykALABkZdpHS/bjE8m8TI6oFxI36YfxEO7Vbe8sTYQT3+qPHgVmdxCzLv8Qk8pj8BLAY24PaE8pyQ2f3NQJC2XDfKZAGTF0asVxKSdWi9JtrvK5mfZrwkZNBq3GfEabkWOehm2+AESWWc8nxrBuWq3RD2KaHZx6AfJXTNAqHGPAobXRP/8OWZGKAZbDlRW1PBxLcpzjXEfce+oqW/o2TjaWb83zyklVhJs9oweAluL9hdMLa3YvadoJ+04mSSc+WVTdA+ZuEQHPhzomr/nczgR3pt+qIZSJaz9I2wM5fts3DiN3BWw+fCEdB+8h7Iq5AiuL2pfupECl0tT8MpvJwViNePYQnU/qdr6lnywOmFQVFEg0QJeZKsaObSo1JKnedzWSuCtKeD1Ehjhll8zLG1nn1wEaYZIPfKPJWmrDCZpTrekWd7i9BfenxR3UpyoaAmkoL0vpA4Rz77SEHFolwyaFKf5vy4B//qMqnCqNsPPIZeBLW8/XkWDyI7fePexgxA5/8QRr3v75mVvEFRNssS/4toFP3ApHbvSJJE0sDkl8XID/UN9Cse5n9riMyfg8UVqZ2BOoAXvzvCWYMZBG2M=----ATTACHMENT:----MjQ0ODAxNDUwMDgzNzY5NyAzNjk2NTcwNjUyMTk5ODA4IDUxOTAwMjgyNzY1NzA2Nzk=