123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- <?php
- namespace Gedmo\Loggable\Document\MappedSuperclass;
- use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoODM;
- /**
- * Gedmo\Loggable\Document\MappedSuperclass\AbstractLogEntry
- *
- * @MongoODM\MappedSuperclass
- */
- abstract class AbstractLogEntry
- {
- /**
- * @var integer $id
- *
- * @MongoODM\Id
- */
- protected $id;
- /**
- * @var string $action
- *
- * @MongoODM\String
- */
- protected $action;
- /**
- * @var \DateTime $loggedAt
- *
- * @MongoODM\Index
- * @MongoODM\Date
- */
- protected $loggedAt;
- /**
- * @var string $objectId
- *
- * @MongoODM\String(nullable=true)
- */
- protected $objectId;
- /**
- * @var string $objectClass
- *
- * @MongoODM\Index
- * @MongoODM\String
- */
- protected $objectClass;
- /**
- * @var integer $version
- *
- * @MongoODM\Int
- */
- protected $version;
- /**
- * @var string $data
- *
- * @MongoODM\Hash(nullable=true)
- */
- protected $data;
- /**
- * @var string $data
- *
- * @MongoODM\Index
- * @MongoODM\String(nullable=true)
- */
- protected $username;
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Get action
- *
- * @return string
- */
- public function getAction()
- {
- return $this->action;
- }
- /**
- * Set action
- *
- * @param string $action
- */
- public function setAction($action)
- {
- $this->action = $action;
- }
- /**
- * Get object class
- *
- * @return string
- */
- public function getObjectClass()
- {
- return $this->objectClass;
- }
- /**
- * Set object class
- *
- * @param string $objectClass
- */
- public function setObjectClass($objectClass)
- {
- $this->objectClass = $objectClass;
- }
- /**
- * Get object id
- *
- * @return string
- */
- public function getObjectId()
- {
- return $this->objectId;
- }
- /**
- * Set object id
- *
- * @param string $objectId
- */
- public function setObjectId($objectId)
- {
- $this->objectId = $objectId;
- }
- /**
- * Get username
- *
- * @return string
- */
- public function getUsername()
- {
- return $this->username;
- }
- /**
- * Set username
- *
- * @param string $username
- */
- public function setUsername($username)
- {
- $this->username = $username;
- }
- /**
- * Get loggedAt
- *
- * @return \DateTime
- */
- public function getLoggedAt()
- {
- return $this->loggedAt;
- }
- /**
- * Set loggedAt to "now"
- */
- public function setLoggedAt()
- {
- $this->loggedAt = new \DateTime();
- }
- /**
- * Get data
- *
- * @return array or null
- */
- public function getData()
- {
- return $this->data;
- }
- /**
- * Set data
- *
- * @param array $data
- */
- public function setData($data)
- {
- $this->data = $data;
- }
- /**
- * Set current version
- *
- * @param integer $version
- */
- public function setVersion($version)
- {
- $this->version = $version;
- }
- /**
- * Get current version
- *
- * @return integer
- */
- public function getVersion()
- {
- return $this->version;
- }
- }
|