Blameable.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace Gedmo\Blameable;
  3. /**
  4. * This interface is not necessary but can be implemented for
  5. * Entities which in some cases needs to be identified as
  6. * Blameable
  7. *
  8. * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
  9. * @package Gedmo.Blameable
  10. * @subpackage Blameable
  11. * @link http://www.gediminasm.org
  12. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  13. */
  14. interface Blameable
  15. {
  16. // blameable expects annotations on properties
  17. /**
  18. * @gedmo:Blameable(on="create")
  19. * dates which should be updated on insert only
  20. */
  21. /**
  22. * @gedmo:Blameable(on="update")
  23. * dates which should be updated on update and insert
  24. */
  25. /**
  26. * @gedmo:Blameable(on="change", field="field", value="value")
  27. * dates which should be updated on changed "property"
  28. * value and become equal to given "value"
  29. */
  30. /**
  31. * @gedmo:Blameable(on="change", field="field")
  32. * dates which should be updated on changed "property"
  33. */
  34. /**
  35. * example
  36. *
  37. * @gedmo:Blameable(on="create")
  38. * @Column(type="date")
  39. * $created
  40. */
  41. }