User.php 778 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace Mapping\Fixture\Document;
  3. use Gedmo\Mapping\Mock\Extension\Encoder\Mapping as Ext;
  4. use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
  5. /**
  6. * @ODM\Document(collection="test_users")
  7. */
  8. class User
  9. {
  10. /**
  11. * @ODM\Id
  12. */
  13. private $id;
  14. /**
  15. * @Ext\Encode(type="sha1", secret="xxx")
  16. * @ODM\String
  17. */
  18. private $name;
  19. /**
  20. * @Ext\Encode(type="md5")
  21. * @ODM\String
  22. */
  23. private $password;
  24. public function setName($name)
  25. {
  26. $this->name = $name;
  27. }
  28. public function getName()
  29. {
  30. return $this->name;
  31. }
  32. public function setPassword($password)
  33. {
  34. $this->password = $password;
  35. }
  36. public function getPassword()
  37. {
  38. return $this->password;
  39. }
  40. }