forked from intellectsoft-uk/MssqlBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImproveinMssqlBundle.php
36 lines (29 loc) · 1.08 KB
/
ImproveinMssqlBundle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Improvein\MssqlBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Doctrine\DBAL\Types\Type;
class ImproveinMssqlBundle extends Bundle
{
public function boot()
{
// Register custom data types
if(!Type::hasType('uniqueidentifier')) {
Type::addType('uniqueidentifier', 'Improvein\MssqlBundle\Types\UniqueidentifierType');
}
if(!Type::hasType('geography')) {
Type::addType('geography', 'Improvein\MssqlBundle\Types\PointType');
}
Type::overrideType(Type::DATE, 'Improvein\MssqlBundle\Types\DateType');
Type::overrideType(Type::DATETIME, 'Improvein\MssqlBundle\Types\DateTimeType');
Type::overrideType(Type::TEXT, 'Improvein\MssqlBundle\Types\TextType');
Type::overrideType(Type::STRING, 'Improvein\MssqlBundle\Types\StringType');
}
}