vendor/webbamboo/spinners-common/src/Entity/H2Interesting.php line 13

  1. <?php
  2. namespace Webbamboo\SpinnersCommon\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * H2Interesting
  6.  *
  7.  * @ORM\Table("H2Interesting")
  8.  * @ORM\Entity
  9.  */
  10. class H2Interesting
  11. {
  12.     /**
  13.      * @var integer
  14.      *
  15.      * @ORM\Column(name="id", type="integer")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var string
  22.      *
  23.      * @ORM\Column(name="h2", type="string", length=255)
  24.      */
  25.     private $h2;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity="Company", mappedBy="h2interesting")
  28.      */
  29.     private $companies;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity="City", mappedBy="h2interesting")
  32.      */
  33.     private $cities;
  34.     /**
  35.      * Get id
  36.      *
  37.      * @return integer
  38.      */
  39.     public function getId()
  40.     {
  41.         return $this->id;
  42.     }
  43.     /**
  44.      * Set h2
  45.      *
  46.      * @param string $h2
  47.      * @return H2Interesting
  48.      */
  49.     public function setH2($h2)
  50.     {
  51.         $this->h2 $h2;
  52.         return $this;
  53.     }
  54.     /**
  55.      * Get h2
  56.      *
  57.      * @return string
  58.      */
  59.     public function getH2()
  60.     {
  61.         return $this->h2;
  62.     }
  63.     /**
  64.      * Constructor
  65.      */
  66.     public function __construct()
  67.     {
  68.         $this->companies = new \Doctrine\Common\Collections\ArrayCollection();
  69.     }
  70.     /**
  71.      * Add companies
  72.      *
  73.      * @param \Webbamboo\SpinnersCommon\Entity\Company $companies
  74.      * @return H2Interesting
  75.      */
  76.     public function addCompany(\Webbamboo\SpinnersCommon\Entity\Company $companies)
  77.     {
  78.         $this->companies[] = $companies;
  79.         return $this;
  80.     }
  81.     /**
  82.      * Remove companies
  83.      *
  84.      * @param \Webbamboo\SpinnersCommon\Entity\Company $companies
  85.      */
  86.     public function removeCompany(\Webbamboo\SpinnersCommon\Entity\Company $companies)
  87.     {
  88.         $this->companies->removeElement($companies);
  89.     }
  90.     /**
  91.      * Get companies
  92.      *
  93.      * @return \Doctrine\Common\Collections\Collection
  94.      */
  95.     public function getCompanies()
  96.     {
  97.         return $this->companies;
  98.     }
  99.     /**
  100.      * Add cities
  101.      *
  102.      * @param \Webbamboo\SpinnersCommon\Entity\City $cities
  103.      * @return H2Interesting
  104.      */
  105.     public function addCity(\Webbamboo\SpinnersCommon\Entity\City $cities)
  106.     {
  107.         $this->cities[] = $cities;
  108.         return $this;
  109.     }
  110.     /**
  111.      * Remove cities
  112.      *
  113.      * @param \Webbamboo\SpinnersCommon\Entity\City $cities
  114.      */
  115.     public function removeCity(\Webbamboo\SpinnersCommon\Entity\City $cities)
  116.     {
  117.         $this->cities->removeElement($cities);
  118.     }
  119.     /**
  120.      * Get cities
  121.      *
  122.      * @return \Doctrine\Common\Collections\Collection
  123.      */
  124.     public function getCities()
  125.     {
  126.         return $this->cities;
  127.     }
  128. }