TplBlock/vendor/jms/serializer/tests/Metadata/Driver/php/ObjectWithVirtualPropertiesAndExcludeAll.php
2018-03-26 21:57:35 +02:00

15 lines
409 B
PHP

<?php
use JMS\Serializer\Metadata\ClassMetadata;
use JMS\Serializer\Metadata\VirtualPropertyMetadata;
$className = 'JMS\Serializer\Tests\Fixtures\ObjectWithVirtualPropertiesAndExcludeAll';
$metadata = new ClassMetadata($className);
$pMetadata = new VirtualPropertyMetadata($className, 'virtualValue');
$pMetadata->getter = 'getVirtualValue';
$metadata->addPropertyMetadata($pMetadata);
return $metadata;