ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter::getType PHP Méthode

getType() private méthode

Converts a Doctrine type in PHP type.
private getType ( string $doctrineType ) : string
$doctrineType string
Résultat string
    private function getType(string $doctrineType) : string
    {
        switch ($doctrineType) {
            case Type::TARRAY:
                return 'array';
            case Type::BIGINT:
            case Type::INTEGER:
            case Type::SMALLINT:
                return 'int';
            case Type::BOOLEAN:
                return 'bool';
            case Type::DATE:
            case Type::TIME:
            case Type::DATETIME:
            case Type::DATETIMETZ:
                return \DateTimeInterface::class;
            case Type::FLOAT:
                return 'float';
        }
        return 'string';
    }