Lines Matching refs:metadata
239 public function visitDiscriminatorMapProperty($data, ClassMetadata $metadata): string argument
243 …case $metadata->xmlDiscriminatorAttribute && null === $metadata->xmlDiscriminatorNamespace && isse…
244 return (string) $data->attributes()->{$metadata->discriminatorFieldName};
247 …metadata->xmlDiscriminatorAttribute && null !== $metadata->xmlDiscriminatorNamespace && isset($dat…
248 …return (string) $data->attributes($metadata->xmlDiscriminatorNamespace)->{$metadata->discriminator…
251 …metadata->xmlDiscriminatorAttribute && null !== $metadata->xmlDiscriminatorNamespace && isset($dat…
252 …return (string) $data->children($metadata->xmlDiscriminatorNamespace)->{$metadata->discriminatorFi…
254 case isset($data->{$metadata->discriminatorFieldName}):
255 return (string) $data->{$metadata->discriminatorFieldName};
260 $metadata->discriminatorFieldName,
261 $metadata->name
266 public function startVisitingObject(ClassMetadata $metadata, object $object, array $type): void argument
269 $this->objectMetadataStack->push($metadata);
274 public function visitProperty(PropertyMetadata $metadata, $data) argument
276 $name = $metadata->serializedName;
278 if (!$metadata->type) {
279 …untimeException(sprintf('You must define a type for %s::$%s.', $metadata->class, $metadata->name));
281 if (true === $metadata->inline) {
282 return $this->navigator->accept($data, $metadata->type);
284 if ($metadata->xmlAttribute) {
285 $attributes = $data->attributes($metadata->xmlNamespace);
287 return $this->navigator->accept($attributes[$name], $metadata->type);
293 if ($metadata->xmlValue) {
294 return $this->navigator->accept($data, $metadata->type);
297 if ($metadata->xmlCollection) {
299 if (!$metadata->xmlCollectionInline) {
300 $enclosingElem = $data->children($metadata->xmlNamespace)->$name;
303 $this->setCurrentMetadata($metadata);
304 $v = $this->navigator->accept($enclosingElem, $metadata->type);
309 if ($metadata->xmlNamespace) {
310 $node = $data->children($metadata->xmlNamespace)->$name;
329 if ($metadata->xmlKeyValuePairs) {
330 $this->setCurrentMetadata($metadata);
333 return $this->navigator->accept($node, $metadata->type);
339 public function endVisitingObject(ClassMetadata $metadata, $data, array $type): object argument
364 public function setCurrentMetadata(PropertyMetadata $metadata): void argument
367 $this->currentMetadata = $metadata;