CompositeIdentEntity.php 918 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. $this->id1 = $id1;
  18. $this->id2 = $id2;
  19. $this->name = $name;
  20. }
  21. public function getRoles()
  22. {
  23. }
  24. public function getPassword()
  25. {
  26. }
  27. public function getSalt()
  28. {
  29. }
  30. public function getUsername()
  31. {
  32. return $this->name;
  33. }
  34. public function eraseCredentials()
  35. {
  36. }
  37. public function equals(UserInterface $user)
  38. {
  39. }
  40. }