Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 958 Bytes

File metadata and controls

31 lines (21 loc) · 958 Bytes

ResultNormalizer

In order to be able to normalize results, we have to implement additional interface with QueryObject.

<?php

use use Doctrine\DBAL\Types\Types;
use Imatic\Bundle\DataBundle\Data\Driver\DoctrineDBAL\QueryObjectInterface;

class UserQuery implements QueryObjectInterface, NormalizeResultQueryObjectInterface
{
    // ...

    public function getNormalizerMap(): array
    {
        return [
            'birth_date' => Types::DATETIME_MUTABLE,
        ];
    }
}