public function getProperty($name)
{
if (isset($this->properties[$name])) {
return $this->properties[$name];
}
$property = new PropertyValue($name);
$this->properties[$name] = $property;
return $property;
}
/** * @param JsonSerializationVisitor $visitor * @param NodeInterface $nodeInterface * @param array $type * @param Context $context */ public function doDeserialize(JsonDeserializationVisitor $visitor, array $data, array $type, Context $context) { $container = new Structure(); foreach ($data as $key => $value) { $container->getProperty($key)->setValue($value); } return $container; }