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

15 lines
409 B
PHP
Raw Normal View History

2018-03-26 21:57:35 +02:00
<?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;