TinyInteger.php 788 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Illuminate\Tests\Integration\Database\Fixtures;
  3. use Doctrine\DBAL\Platforms\AbstractPlatform;
  4. use Doctrine\DBAL\Types\Type;
  5. class TinyInteger extends Type
  6. {
  7. /**
  8. * The name of the custom type.
  9. *
  10. * @var string
  11. */
  12. const NAME = 'tinyinteger';
  13. /**
  14. * Gets the SQL declaration snippet for a field of this type.
  15. *
  16. * @param array $fieldDeclaration
  17. * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
  18. * @return string
  19. */
  20. public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
  21. {
  22. return 'TINYINT';
  23. }
  24. /**
  25. * The name of the custom type.
  26. *
  27. * @return string
  28. */
  29. public function getName()
  30. {
  31. return self::NAME;
  32. }
  33. }