BlameableEntity.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. namespace Gedmo\Blameable\Traits;
  3. /**
  4. * Blameable Trait, usable with PHP >= 5.4
  5. *
  6. * @author David Buchmann <mail@davidbu.ch>
  7. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  8. */
  9. trait BlameableEntity
  10. {
  11. /**
  12. * @Gedmo\Blameable(on="create")
  13. * @ORM\Column(type="string")
  14. */
  15. private $createdBy;
  16. /**
  17. * @Gedmo\Blameable(on="update")
  18. * @ORM\Column(type="string")
  19. */
  20. private $updatedBy;
  21. /**
  22. * Sets createdBy.
  23. *
  24. * @param string $createdBy
  25. * @return $this
  26. */
  27. public function setCreatedBy($createdBy)
  28. {
  29. $this->createdBy = $createdBy;
  30. return $this;
  31. }
  32. /**
  33. * Returns createdBy.
  34. *
  35. * @return string
  36. */
  37. public function getCreatedBy()
  38. {
  39. return $this->createdBy;
  40. }
  41. /**
  42. * Sets updatedBy.
  43. *
  44. * @param string $updatedBy
  45. * @return $this
  46. */
  47. public function setUpdatedBy($updatedBy)
  48. {
  49. $this->updatedBy = $updatedBy;
  50. return $this;
  51. }
  52. /**
  53. * Returns updatedBy.
  54. *
  55. * @return string
  56. */
  57. public function getUpdatedBy()
  58. {
  59. return $this->updatedBy;
  60. }
  61. }