26 lines
696 B
PHP
26 lines
696 B
PHP
|
<?php
|
||
|
|
||
|
namespace Symfony\Tests\Component\Serializer\Fixtures;
|
||
|
|
||
|
use Symfony\Component\Serializer\Normalizer\NormalizableInterface;
|
||
|
use Symfony\Component\Serializer\SerializerInterface;
|
||
|
|
||
|
class NormalizableTraversableDummy extends TraversableDummy implements NormalizableInterface
|
||
|
{
|
||
|
public function normalize(SerializerInterface $serializer, $format = null)
|
||
|
{
|
||
|
return array(
|
||
|
'foo' => 'normalizedFoo',
|
||
|
'bar' => 'normalizedBar',
|
||
|
);
|
||
|
}
|
||
|
|
||
|
public function denormalize(SerializerInterface $serializer, $data, $format = null)
|
||
|
{
|
||
|
return array(
|
||
|
'foo' => 'denormalizedFoo',
|
||
|
'bar' => 'denormalizedBar',
|
||
|
);
|
||
|
}
|
||
|
}
|