ReferenceIntegrity.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  10. */
  11. interface ReferenceIntegrity
  12. {
  13. /**
  14. * ReferenceIntegrity expects certain settings to be required
  15. * in combination with an association
  16. */
  17. /**
  18. * example
  19. * @ODM\ReferenceOne(targetDocument="Article", nullable="true", mappedBy="type")
  20. * @Gedmo\ReferenceIntegrity("nullify")
  21. * @var Article
  22. */
  23. /**
  24. * example
  25. * @ODM\ReferenceOne(targetDocument="Article", nullable="true", mappedBy="type")
  26. * @Gedmo\ReferenceIntegrity("restrict")
  27. * @var Article
  28. */
  29. /**
  30. * example
  31. * @ODM\ReferenceMany(targetDocument="Article", nullable="true", mappedBy="type")
  32. * @Gedmo\ReferenceIntegrity("nullify")
  33. * @var Doctrine\Common\Collections\ArrayCollection
  34. */
  35. /**
  36. * example
  37. * @ODM\ReferenceMany(targetDocument="Article", nullable="true", mappedBy="type")
  38. * @Gedmo\ReferenceIntegrity("restrict")
  39. * @var Doctrine\Common\Collections\ArrayCollection
  40. */
  41. }