for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Chubbyphp\Serialization\Normalizer;
use Chubbyphp\Serialization\Accessor\AccessorInterface;
final class FieldNormalizer implements FieldNormalizerInterface
{
/**
* @var AccessorInterface
*/
private $accessor;
public function __construct(AccessorInterface $accessor)
$this->accessor = $accessor;
}
* @param object $object
*
* @return mixed
public function normalizeField(
string $path,
$object,
NormalizerContextInterface $context,
NormalizerInterface $normalizer = null
) {
return $this->accessor->getValue($object);