\Alddesign\Crudkit\ClassesEnumType

Creating a custom enum type for integration with doctrine/dbal

Summary

Methods
Properties
Constants
registerDoctrineEnumMapping()
getSQLDeclaration()
convertToPHPValue()
convertToDatabaseValue()
getName()
requiresSQLCommentHint()
No public properties found
TYPENAME
No protected methods found
$values
N/A
No private methods found
No private properties found
N/A

Constants

TYPENAME

TYPENAME = 'enum'

Properties

$values

$values : 

Type

Methods

registerDoctrineEnumMapping()

registerDoctrineEnumMapping() : void

Creating custom type to deal with ENUM.

getSQLDeclaration()

getSQLDeclaration(array  $fieldDeclaration, \Doctrine\DBAL\Platforms\AbstractPlatform  $platform) 

return the SQL used to create your column type. To create a portable column type, use the $platform.

Parameters

array $fieldDeclaration
\Doctrine\DBAL\Platforms\AbstractPlatform $platform

convertToPHPValue()

convertToPHPValue(  $value, \Doctrine\DBAL\Platforms\AbstractPlatform  $platform) 

This is executed when the value is read from the database. Make your conversions here, optionally using the $platform.

Parameters

$value
\Doctrine\DBAL\Platforms\AbstractPlatform $platform

convertToDatabaseValue()

convertToDatabaseValue(  $value, \Doctrine\DBAL\Platforms\AbstractPlatform  $platform) 

This is executed when the value is written to the database. Make your conversions here, optionally using the $platform.

Parameters

$value
\Doctrine\DBAL\Platforms\AbstractPlatform $platform

getName()

getName() 

requiresSQLCommentHint()

requiresSQLCommentHint(\Doctrine\DBAL\Platforms\AbstractPlatform  $platform) 

Parameters

\Doctrine\DBAL\Platforms\AbstractPlatform $platform