Vendor.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /*
  3. * This file is part of Packagist.
  4. *
  5. * (c) Jordi Boggiano <j.boggiano@seld.be>
  6. * Nils Adermann <naderman@naderman.de>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Packagist\WebBundle\Entity;
  12. use Composer\Factory;
  13. use Composer\IO\NullIO;
  14. use Composer\Repository\VcsRepository;
  15. use Doctrine\Common\Collections\ArrayCollection;
  16. use Doctrine\ORM\Mapping as ORM;
  17. use Symfony\Component\Validator\Constraints as Assert;
  18. use Symfony\Component\Validator\Context\ExecutionContextInterface;
  19. use Composer\Repository\Vcs\GitHubDriver;
  20. /**
  21. * @ORM\Entity(repositoryClass="Packagist\WebBundle\Entity\VendorRepository")
  22. * @ORM\Table(
  23. * name="vendor",
  24. * indexes={
  25. * @ORM\Index(name="verified_idx",columns={"verified"})
  26. * }
  27. * )
  28. * @author Jordi Boggiano <j.boggiano@seld.be>
  29. */
  30. class Vendor
  31. {
  32. /**
  33. * Unique vendor name
  34. *
  35. * @ORM\Id
  36. * @ORM\Column(length=191)
  37. */
  38. private $name;
  39. /**
  40. * @ORM\Column(type="boolean")
  41. */
  42. private $verified = false;
  43. public function setName(string $name)
  44. {
  45. $this->name = $name;
  46. }
  47. public function getName(): string
  48. {
  49. return $this->name;
  50. }
  51. public function setVerified(bool $verified)
  52. {
  53. $this->verified = $verified;
  54. }
  55. public function getVerified(): bool
  56. {
  57. return $this->verified;
  58. }
  59. }