Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / DbalTypes / UpperCaseStringType.php
1 <?php
2
3 namespace Doctrine\Tests\DbalTypes;
4
5 use Doctrine\DBAL\Types\StringType;
6 use Doctrine\DBAL\Platforms\AbstractPlatform;
7
8 class UpperCaseStringType extends StringType
9 {
10     public function getName()
11     {
12         return 'upper_case_string';
13     }
14
15     public function canRequireSQLConversion()
16     {
17         return true;
18     }
19
20     public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform)
21     {
22         return 'UPPER(' . $sqlExpr . ')';
23     }
24
25     public function convertToPHPValueSQL($sqlExpr, $platform)
26     {
27         return 'LOWER(' . $sqlExpr . ')';
28     }
29 }