CompositeIdentEntity.php 922 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace Symfony\Tests\Bridge\Doctrine\Fixtures;
  3. use Doctrine\ORM\Mapping\Id;
  4. use Doctrine\ORM\Mapping\Column;
  5. use Doctrine\ORM\Mapping\Entity;
  6. use Symfony\Component\Security\Core\User\UserInterface;
  7. /** @Entity */
  8. class CompositeIdentEntity implements UserInterface
  9. {
  10. /** @Id @Column(type="integer") */
  11. protected $id1;
  12. /** @Id @Column(type="integer") */
  13. protected $id2;
  14. /** @Column(type="string") */
  15. public $name;
  16. public function __construct($id1, $id2, $name)
  17. {
  18. $this->id1 = $id1;
  19. $this->id2 = $id2;
  20. $this->name = $name;
  21. }
  22. public function getRoles()
  23. {
  24. }
  25. public function getPassword()
  26. {
  27. }
  28. public function getSalt()
  29. {
  30. }
  31. public function getUsername()
  32. {
  33. return $this->name;
  34. }
  35. public function eraseCredentials()
  36. {
  37. }
  38. public function equals(UserInterface $user)
  39. {
  40. }
  41. }