User.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Bridge\Doctrine\Tests\Fixtures;
  11. use Doctrine\ORM\Mapping\Column;
  12. use Doctrine\ORM\Mapping\Entity;
  13. use Doctrine\ORM\Mapping\Id;
  14. use Symfony\Component\Security\Core\User\UserInterface;
  15. /** @Entity */
  16. class User implements UserInterface
  17. {
  18. /** @Id @Column(type="integer") */
  19. protected $id1;
  20. /** @Id @Column(type="integer") */
  21. protected $id2;
  22. /** @Column(type="string") */
  23. public $name;
  24. public function __construct($id1, $id2, $name)
  25. {
  26. $this->id1 = $id1;
  27. $this->id2 = $id2;
  28. $this->name = $name;
  29. }
  30. public function getRoles()
  31. {
  32. }
  33. public function getPassword()
  34. {
  35. }
  36. public function getSalt()
  37. {
  38. }
  39. public function getUsername()
  40. {
  41. return $this->name;
  42. }
  43. public function eraseCredentials()
  44. {
  45. }
  46. public function equals(UserInterface $user)
  47. {
  48. }
  49. }