14 lines
413 B
PHP
14 lines
413 B
PHP
<?php
|
|
|
|
use JMS\Serializer\Metadata\ClassMetadata;
|
|
use JMS\Serializer\Metadata\ExpressionPropertyMetadata;
|
|
|
|
$className = 'JMS\Serializer\Tests\Fixtures\ObjectWithExpressionVirtualPropertiesAndExcludeAll';
|
|
|
|
$metadata = new ClassMetadata($className);
|
|
|
|
$pMetadata = new ExpressionPropertyMetadata($className, 'virtualValue', 'object.getVirtualValue()');
|
|
$metadata->addPropertyMetadata($pMetadata);
|
|
|
|
return $metadata;
|