src/Entity/DnsitGenre.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Mask\MarkingCodesMask;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * DnsitGenre
  7.  *
  8.  * @ORM\Table(name="dnsit_genre")
  9.  * @ORM\Entity(repositoryClass="App\Repository\DnsitGenreRepository")
  10.  */
  11. class DnsitGenre
  12. {
  13.     /**
  14.      * @var int|null
  15.      *
  16.      * @ORM\Column(name="genre_code", type="bigint", nullable=true)
  17.      */
  18.     private $genreCode;
  19.     /**
  20.      * @var string|null
  21.      *
  22.      * @ORM\Column(name="name", type="string", length=255, nullable=true)
  23.      */
  24.     private $name;
  25.     /**
  26.      * @var int|null
  27.      *
  28.      * @ORM\Column(name="entity", type="bigint", nullable=true)
  29.      */
  30.     private $entity;
  31.     /**
  32.      * @var int|null
  33.      *
  34.      * @ORM\Column(name="marking", type="smallint", nullable=true)
  35.      */
  36.     private $marking;
  37.     /**
  38.      * @var string|null
  39.      *
  40.      * @ORM\Column(name="params", type="text", nullable=true)
  41.      */
  42.     private $params;
  43.     /**
  44.      * @var \DateTime|null
  45.      *
  46.      * @ORM\Column(name="created_at", type="datetime", nullable=true)
  47.      */
  48.     private $createdAt;
  49.     /**
  50.      * @var int|null
  51.      *
  52.      * @ORM\Column(name="created_by", type="bigint", nullable=true)
  53.      */
  54.     private $createdBy;
  55.     /**
  56.      * @var \DateTime|null
  57.      *
  58.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  59.      */
  60.     private $updatedAt;
  61.     /**
  62.      * @var int|null
  63.      *
  64.      * @ORM\Column(name="updated_by", type="bigint", nullable=true)
  65.      */
  66.     private $updatedBy;
  67.     /**
  68.      * @var int
  69.      *
  70.      * @ORM\Column(name="id", type="bigint")
  71.      * @ORM\Id
  72.      * @ORM\GeneratedValue(strategy="IDENTITY")
  73.      */
  74.     private $id;
  75.     public function __toString(){
  76.         return $this->name;
  77.     }
  78.     public function getGenreCode(): ?int
  79.     {
  80.         return $this->genreCode;
  81.     }
  82.     public function setGenreCode(?int $genreCode): self
  83.     {
  84.         $this->genreCode $genreCode;
  85.         return $this;
  86.     }
  87.     public function getName(): ?string
  88.     {
  89.         return $this->name;
  90.     }
  91.     public function setName(?string $name): self
  92.     {
  93.         $this->name $name;
  94.         return $this;
  95.     }
  96.     public function getEntity(): ?int
  97.     {
  98.         return $this->entity;
  99.     }
  100.     public function setEntity(?int $entity): self
  101.     {
  102.         $this->entity $entity;
  103.         return $this;
  104.     }
  105.     public function getMarking(): ?int
  106.     {
  107.         return $this->marking;
  108.     }
  109.     public function setMarking(?int $marking): self
  110.     {
  111.         $this->marking $marking;
  112.         return $this;
  113.     }
  114.     public function getParams(): ?string
  115.     {
  116.         return $this->params;
  117.     }
  118.     public function setParams(?string $params): self
  119.     {
  120.         $this->params $params;
  121.         return $this;
  122.     }
  123.     public function getCreatedAt(): ?\DateTimeInterface
  124.     {
  125.         return $this->createdAt;
  126.     }
  127.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  128.     {
  129.         $this->createdAt $createdAt;
  130.         return $this;
  131.     }
  132.     public function getCreatedBy(): ?int
  133.     {
  134.         return $this->createdBy;
  135.     }
  136.     public function setCreatedBy(?int $createdBy): self
  137.     {
  138.         $this->createdBy $createdBy;
  139.         return $this;
  140.     }
  141.     public function getUpdatedAt(): ?\DateTimeInterface
  142.     {
  143.         return $this->updatedAt;
  144.     }
  145.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  146.     {
  147.         $this->updatedAt $updatedAt;
  148.         return $this;
  149.     }
  150.     public function getUpdatedBy(): ?int
  151.     {
  152.         return $this->updatedBy;
  153.     }
  154.     public function setUpdatedBy(?int $updatedBy): self
  155.     {
  156.         $this->updatedBy $updatedBy;
  157.         return $this;
  158.     }
  159.     public function getId(): ?int
  160.     {
  161.         return $this->id;
  162.     }
  163.     public function bindLeiData($xmlGenre$language){
  164.         $this->setGenreCode((int) $xmlGenre->Genre);
  165.         $this->setName((string) $xmlGenre->NomGenre);
  166.         $this->setMarking(MarkingCodesMask::LEI);
  167.     }
  168. }