1
0
mirror of synced 2024-12-05 03:06:05 +03:00

Merge pull request #1329 from Wilt/patch-1

Fix for inconsistent use of getSQLDeclaration
This commit is contained in:
Marco Pivetta 2015-03-13 17:44:40 +01:00
commit 6cf76158a0
3 changed files with 4 additions and 4 deletions

View File

@ -150,7 +150,7 @@ Now we're going to create the ``point`` type and implement all required methods.
return self::POINT;
}
public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
return 'POINT';
}

View File

@ -24,7 +24,7 @@ you wish. Here is an example skeleton of such a custom type class:
{
const MYTYPE = 'mytype'; // modify to match your type name
public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
// return the SQL used to create your column type. To create a portable column type, use the $platform.
}

View File

@ -96,7 +96,7 @@ For example for the previous enum type:
const STATUS_VISIBLE = 'visible';
const STATUS_INVISIBLE = 'invisible';
public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
return "ENUM('visible', 'invisible') COMMENT '(DC2Type:enumvisibility)'";
}
@ -148,7 +148,7 @@ You can generalize this approach easily to create a base class for enums:
protected $name;
protected $values = array();
public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
$values = array_map(function($val) { return "'".$val."'"; }, $this->values);