BlameableEntity.php 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. * @package Gedmo.Blameable.Traits
  8. * @subpackage BlameableEntity
  9. * @link http://www.gediminasm.org
  10. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  11. */
  12. trait BlameableEntity
  13. {
  14. /**
  15. * @Gedmo\Blameable(on="create")
  16. * @ORM\Column(type="string")
  17. */
  18. private $createdBy;
  19. /**
  20. * @Gedmo\Blameable(on="update")
  21. * @ORM\Column(type="string")
  22. */
  23. private $updatedBy;
  24. /**
  25. * Sets createdBy.
  26. *
  27. * @param string $createdBy
  28. * @return $this
  29. */
  30. public function setCreatedBy($createdBy)
  31. {
  32. $this->createdBy = $createdBy;
  33. return $this;
  34. }
  35. /**
  36. * Returns createdBy.
  37. *
  38. * @return string
  39. */
  40. public function getCreatedBy()
  41. {
  42. return $this->createdBy;
  43. }
  44. /**
  45. * Sets updatedBy.
  46. *
  47. * @param string $updatedBy
  48. * @return $this
  49. */
  50. public function setUpdatedBy($updatedBy)
  51. {
  52. $this->updatedBy = $updatedBy;
  53. return $this;
  54. }
  55. /**
  56. * Returns updatedBy.
  57. *
  58. * @return string
  59. */
  60. public function getUpdatedBy()
  61. {
  62. return $this->updatedBy;
  63. }
  64. }