Blameable.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 Blameable
  10. {
  11. /**
  12. * @var string
  13. */
  14. private $createdBy;
  15. /**
  16. * @var string
  17. */
  18. private $updatedBy;
  19. /**
  20. * Sets createdBy.
  21. *
  22. * @param string $createdBy
  23. * @return $this
  24. */
  25. public function setCreatedBy($createdBy)
  26. {
  27. $this->createdBy = $createdBy;
  28. return $this;
  29. }
  30. /**
  31. * Returns createdBy.
  32. *
  33. * @return string
  34. */
  35. public function getCreatedBy()
  36. {
  37. return $this->createdBy;
  38. }
  39. /**
  40. * Sets updatedBy.
  41. *
  42. * @param string $updatedBy
  43. * @return $this
  44. */
  45. public function setUpdatedBy($updatedBy)
  46. {
  47. $this->updatedBy = $updatedBy;
  48. return $this;
  49. }
  50. /**
  51. * Returns updatedBy.
  52. *
  53. * @return string
  54. */
  55. public function getUpdatedBy()
  56. {
  57. return $this->updatedBy;
  58. }
  59. }