Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | /** |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 4 | * This file is part of the Carbon package. |
| 5 | * |
| 6 | * (c) Brian Nesbitt <brian@nesbot.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 10 | */ |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 11 | |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 12 | namespace Carbon\Doctrine; |
| 13 | |
| 14 | use Doctrine\DBAL\Platforms\AbstractPlatform; |
| 15 | |
| 16 | class CarbonType extends DateTimeType implements CarbonDoctrineType |
| 17 | { |
| 18 | /** |
| 19 | * {@inheritdoc} |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 20 | * |
| 21 | * @return string |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 22 | */ |
| 23 | public function getName() |
| 24 | { |
| 25 | return 'carbon'; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * {@inheritdoc} |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 30 | * |
| 31 | * @return bool |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 32 | */ |
| 33 | public function requiresSQLCommentHint(AbstractPlatform $platform) |
| 34 | { |
| 35 | return true; |
| 36 | } |
| 37 | } |