TplBlock/vendor/jms/serializer/tests/Metadata/Driver/php/ObjectWithXmlKeyValuePairs.php

14 lines
370 B
PHP
Raw Normal View History

2018-03-26 21:57:35 +02:00
<?php
use JMS\Serializer\Metadata\ClassMetadata;
use JMS\Serializer\Metadata\PropertyMetadata;
$className = 'JMS\Serializer\Tests\Fixtures\ObjectWithXmlKeyValuePairs';
$metadata = new ClassMetadata($className);
$pMetadata = new PropertyMetadata($className, 'array');
$pMetadata->xmlKeyValuePairs = true;
$metadata->addPropertyMetadata($pMetadata);
return $metadata;