ReferenceIntegrity.php 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Gedmo\ReferenceIntegrity;
  3. /**
  4. * This interface is not necessary but can be implemented for
  5. * Entities which in some cases needs to be identified te have
  6. * ReferenceIntegrity checks
  7. *
  8. * @author Evert Harmeling <evert.harmeling@freshheads.com>
  9. * @package Gedmo.ReferenceIntegrity
  10. * @subpackage ReferenceIntegrity
  11. * @link http://www.gediminasm.org
  12. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  13. */
  14. interface ReferenceIntegrity
  15. {
  16. /**
  17. * ReferenceIntegrity expects certain settings to be required
  18. * in combination with an association
  19. */
  20. /**
  21. * example
  22. * @ODM\ReferenceOne(targetDocument="Article", nullable="true", mappedBy="type")
  23. * @Gedmo\ReferenceIntegrity("nullify")
  24. * @var Article
  25. */
  26. /**
  27. * example
  28. * @ODM\ReferenceOne(targetDocument="Article", nullable="true", mappedBy="type")
  29. * @Gedmo\ReferenceIntegrity("restrict")
  30. * @var Article
  31. */
  32. /**
  33. * example
  34. * @ODM\ReferenceMany(targetDocument="Article", nullable="true", mappedBy="type")
  35. * @Gedmo\ReferenceIntegrity("nullify")
  36. * @var Doctrine\Common\Collections\ArrayCollection
  37. */
  38. /**
  39. * example
  40. * @ODM\ReferenceMany(targetDocument="Article", nullable="true", mappedBy="type")
  41. * @Gedmo\ReferenceIntegrity("restrict")
  42. * @var Doctrine\Common\Collections\ArrayCollection
  43. */
  44. }