Constraint.php 993 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace Doctrine\DBAL\Schema;
  3. use Doctrine\DBAL\Platforms\AbstractPlatform;
  4. /**
  5. * Marker interface for constraints.
  6. */
  7. interface Constraint
  8. {
  9. /**
  10. * @return string
  11. */
  12. public function getName();
  13. /**
  14. * @return string
  15. */
  16. public function getQuotedName(AbstractPlatform $platform);
  17. /**
  18. * Returns the names of the referencing table columns
  19. * the constraint is associated with.
  20. *
  21. * @return string[]
  22. */
  23. public function getColumns();
  24. /**
  25. * Returns the quoted representation of the column names
  26. * the constraint is associated with.
  27. *
  28. * But only if they were defined with one or a column name
  29. * is a keyword reserved by the platform.
  30. * Otherwise the plain unquoted value as inserted is returned.
  31. *
  32. * @param AbstractPlatform $platform The platform to use for quotation.
  33. *
  34. * @return string[]
  35. */
  36. public function getQuotedColumns(AbstractPlatform $platform);
  37. }