123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?php
- namespace Gedmo\Blameable\Traits;
- use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
- use Gedmo\Mapping\Annotation as Gedmo;
- /**
- * Blameable Trait, usable with PHP >= 5.4
- *
- * @author David Buchmann <mail@davidbu.ch>
- * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
- */
- trait BlameableDocument
- {
- /**
- * @var string
- * @Gedmo\Blameable(on="create")
- * @ODM\Field(type="string")
- */
- protected $createdBy;
- /**
- * @var string
- * @Gedmo\Blameable(on="update")
- * @ODM\Field(type="string")
- */
- protected $updatedBy;
- /**
- * Sets createdBy.
- *
- * @param string $createdBy
- * @return $this
- */
- public function setCreatedBy($createdBy)
- {
- $this->createdBy = $createdBy;
- return $this;
- }
- /**
- * Returns createdBy.
- *
- * @return string
- */
- public function getCreatedBy()
- {
- return $this->createdBy;
- }
- /**
- * Sets updatedBy.
- *
- * @param string $updatedBy
- * @return $this
- */
- public function setUpdatedBy($updatedBy)
- {
- $this->updatedBy = $updatedBy;
- return $this;
- }
- /**
- * Returns updatedBy.
- *
- * @return string
- */
- public function getUpdatedBy()
- {
- return $this->updatedBy;
- }
- }
|