src/Entity/DnsitTranslateType.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.  * DnsitTranslateType
  7.  *
  8.  * @ORM\Table(name="dnsit_translate_type")
  9.  * @ORM\Entity(repositoryClass="App\Repository\DnsitTranslateTypeRepository")
  10.  */
  11. class DnsitTranslateType
  12. {
  13.     /**
  14.      * @var string|null
  15.      *
  16.      * @ORM\Column(name="type_text_key", type="string", length=255, nullable=true, unique=true)
  17.      */
  18.     private $typeTextKey;
  19.     /**
  20.      * @var string|null
  21.      *
  22.      * @ORM\Column(name="en_name", type="string", length=255, nullable=true)
  23.      */
  24.     private $enName;
  25.     /**
  26.      * @var string|null
  27.      *
  28.      * @ORM\Column(name="de_name", type="string", length=255, nullable=true)
  29.      */
  30.     private $deName;
  31.     /**
  32.      * @var string|null
  33.      *
  34.      * @ORM\Column(name="nl_name", type="string", length=255, nullable=true)
  35.      */
  36.     private $nlName;
  37.     /**
  38.      * @var string|null
  39.      *
  40.      * @ORM\Column(name="it_name", type="string", length=255, nullable=true)
  41.      */
  42.     private $itName;
  43.     /**
  44.      * @var string|null
  45.      *
  46.      * @ORM\Column(name="es_name", type="string", length=255, nullable=true)
  47.      */
  48.     private $esName;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $ptName;
  53.     /**
  54.      * @var int|null
  55.      *
  56.      * @ORM\Column(name="type_code", type="bigint", nullable=true)
  57.      */
  58.     private $typeCode;
  59.     /**
  60.      * @var int|null
  61.      *
  62.      * @ORM\Column(name="entity", type="bigint", nullable=true)
  63.      */
  64.     private $entity;
  65.     /**
  66.      * @var int|null
  67.      *
  68.      * @ORM\Column(name="marking", type="smallint", nullable=true)
  69.      */
  70.     private $marking;
  71.     /**
  72.      * @var string|null
  73.      *
  74.      * @ORM\Column(name="params", type="text", nullable=true)
  75.      */
  76.     private $params;
  77.     /**
  78.      * @var string|null
  79.      *
  80.      * @ORM\Column(name="type_tag_key", type="string", length=255, nullable=true, unique=true)
  81.      */
  82.     private $typeTagKey;
  83.     /**
  84.      * @var \DateTime|null
  85.      *
  86.      * @ORM\Column(name="created_at", type="datetime", nullable=true)
  87.      */
  88.     private $createdAt;
  89.     /**
  90.      * @var int|null
  91.      *
  92.      * @ORM\Column(name="created_by", type="bigint", nullable=true)
  93.      */
  94.     private $createdBy;
  95.     /**
  96.      * @var \DateTime|null
  97.      *
  98.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  99.      */
  100.     private $updatedAt;
  101.     /**
  102.      * @var int|null
  103.      *
  104.      * @ORM\Column(name="updated_by", type="bigint", nullable=true)
  105.      */
  106.     private $updatedBy;
  107.     /**
  108.      * @var int
  109.      *
  110.      * @ORM\Column(name="id", type="bigint")
  111.      * @ORM\Id
  112.      * @ORM\GeneratedValue(strategy="IDENTITY")
  113.      */
  114.     private $id;
  115.     /**
  116.      * @var \App\Entity\DnsitTranslateCategory
  117.      *
  118.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitTranslateCategory")
  119.      * @ORM\JoinColumns({
  120.      *   @ORM\JoinColumn(name="category_id", referencedColumnName="id")
  121.      * })
  122.      */
  123.     private $category;
  124.     public function getTypeTextKey(): ?string
  125.     {
  126.         return $this->typeTextKey;
  127.     }
  128.     public function setTypeTextKey(?string $typeTextKey): self
  129.     {
  130.         $this->typeTextKey $typeTextKey;
  131.         return $this;
  132.     }
  133.     public function getEnName(): ?string
  134.     {
  135.         return $this->enName;
  136.     }
  137.     public function setEnName(?string $enName): self
  138.     {
  139.         $this->enName $enName;
  140.         return $this;
  141.     }
  142.     public function getDeName(): ?string
  143.     {
  144.         return $this->deName;
  145.     }
  146.     public function setDeName(?string $deName): self
  147.     {
  148.         $this->deName $deName;
  149.         return $this;
  150.     }
  151.     public function getNlName(): ?string
  152.     {
  153.         return $this->nlName;
  154.     }
  155.     public function setNlName(?string $nlName): self
  156.     {
  157.         $this->nlName $nlName;
  158.         return $this;
  159.     }
  160.     public function getItName(): ?string
  161.     {
  162.         return $this->itName;
  163.     }
  164.     public function setItName(?string $itName): self
  165.     {
  166.         $this->itName $itName;
  167.         return $this;
  168.     }
  169.     public function getEsName(): ?string
  170.     {
  171.         return $this->esName;
  172.     }
  173.     public function setEsName(?string $esName): self
  174.     {
  175.         $this->esName $esName;
  176.         return $this;
  177.     }
  178.     public function getPtName(): ?string
  179.     {
  180.         return $this->ptName;
  181.     }
  182.     public function setPtName(?string $ptName): self
  183.     {
  184.         $this->ptName $ptName;
  185.         return $this;
  186.     }
  187.     public function getTypeCode(): ?int
  188.     {
  189.         return $this->typeCode;
  190.     }
  191.     public function setTypeCode(?int $typeCode): self
  192.     {
  193.         $this->typeCode $typeCode;
  194.         return $this;
  195.     }
  196.     public function getEntity(): ?int
  197.     {
  198.         return $this->entity;
  199.     }
  200.     public function setEntity(?int $entity): self
  201.     {
  202.         $this->entity $entity;
  203.         return $this;
  204.     }
  205.     public function getMarking(): ?int
  206.     {
  207.         return $this->marking;
  208.     }
  209.     public function setMarking(?int $marking): self
  210.     {
  211.         $this->marking $marking;
  212.         return $this;
  213.     }
  214.     public function getParams(): ?string
  215.     {
  216.         return $this->params;
  217.     }
  218.     public function setParams(?string $params): self
  219.     {
  220.         $this->params $params;
  221.         return $this;
  222.     }
  223.     public function getTypeTagKey(): ?string
  224.     {
  225.         return $this->typeTagKey;
  226.     }
  227.     public function setTypeTagKey(?string $typeTagKey): self
  228.     {
  229.         $this->typeTagKey $typeTagKey;
  230.         return $this;
  231.     }
  232.     public function getCreatedAt(): ?\DateTimeInterface
  233.     {
  234.         return $this->createdAt;
  235.     }
  236.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  237.     {
  238.         $this->createdAt $createdAt;
  239.         return $this;
  240.     }
  241.     public function getCreatedBy(): ?int
  242.     {
  243.         return $this->createdBy;
  244.     }
  245.     public function setCreatedBy(?int $createdBy): self
  246.     {
  247.         $this->createdBy $createdBy;
  248.         return $this;
  249.     }
  250.     public function getUpdatedAt(): ?\DateTimeInterface
  251.     {
  252.         return $this->updatedAt;
  253.     }
  254.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  255.     {
  256.         $this->updatedAt $updatedAt;
  257.         return $this;
  258.     }
  259.     public function getUpdatedBy(): ?int
  260.     {
  261.         return $this->updatedBy;
  262.     }
  263.     public function setUpdatedBy(?int $updatedBy): self
  264.     {
  265.         $this->updatedBy $updatedBy;
  266.         return $this;
  267.     }
  268.     public function getId(): ?int
  269.     {
  270.         return $this->id;
  271.     }
  272.     public function getCategory(): ?DnsitTranslateCategory
  273.     {
  274.         return $this->category;
  275.     }
  276.     public function setCategory(?DnsitTranslateCategory $category): self
  277.     {
  278.         $this->category $category;
  279.         return $this;
  280.     }
  281.     public function bindLeiData($xmlType$language){
  282.         $this->setTypeCode((int) $xmlType->TYPE);
  283.     
  284.         switch ($language){
  285.             case "en":
  286.                 $this->setEnName((string) $xmlType->NomType);
  287.                 break;
  288.     
  289.             case "de":
  290.                 $this->setDeName((string) $xmlType->NomType);
  291.                 break;
  292.     
  293.             case "nl":
  294.                 $this->setNlName((string) $xmlType->NomType);
  295.                 break;
  296.     
  297.             case "it":
  298.                 $this->setItName((string) $xmlType->NomType);
  299.                 break;
  300.     
  301.             case "es":
  302.                 $this->setEsName((string) $xmlType->NomType);
  303.                 break;
  304.             case "pt":
  305.                 $this->setPtName((string) $xmlType->NomType);
  306.                 break;
  307.         }
  308.         $this->setMarking(MarkingCodesMask::LEI);
  309.     }
  310. }