| 1 | <?php |
||
| 7 | abstract class DocumentType extends DBAL\Types\StringType |
||
| 8 | { |
||
| 9 | const CPF = 'cpf'; |
||
| 10 | |||
| 11 | abstract public function factory($number); |
||
| 12 | |||
| 13 | abstract public function getLength(); |
||
| 14 | |||
| 15 | abstract public function isFixed(); |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Converts a value from its PHP representation to its database representation |
||
| 19 | * of this type. |
||
| 20 | * |
||
| 21 | * @param \Brazanation\Documents\Cnpj $value The value to convert. |
||
| 22 | * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The currently used database platform. |
||
| 23 | * |
||
| 24 | * @return null|string The database representation of the value. |
||
| 25 | */ |
||
| 26 | 2 | public function convertToDatabaseValue($value, DBAL\Platforms\AbstractPlatform $platform) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Converts a value from its database representation to its PHP representation |
||
| 37 | * of this type. |
||
| 38 | * |
||
| 39 | * @param string $value The value to convert. |
||
| 40 | * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform The currently used database platform. |
||
| 41 | * |
||
| 42 | * @return null|\Brazanation\Documents\Cnpj The PHP representation of the value. |
||
| 43 | */ |
||
| 44 | 2 | public function convertToPHPValue($value, DBAL\Platforms\AbstractPlatform $platform) |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @inheritdoc |
||
| 55 | */ |
||
| 56 | 1 | public function getSQLDeclaration(array $fieldDeclaration, DBAL\Platforms\AbstractPlatform $platform) |
|
| 62 | } |
||
| 63 |