src/Entity/DnsitProduct.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Mask\MarkingCodesMask;
  4. use App\Service\BridgeFrontUtils;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Jsor\Doctrine\PostGIS\Types\PostGISType;
  9. use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
  10. /**
  11.  * DnsitProduct
  12.  *
  13.  * @ORM\Table(name="dnsit_product",indexes={@ORM\Index(name="search_product_text_key_idx", columns={"product_text_key"})})
  14.  * @ORM\Entity(repositoryClass="App\Repository\DnsitProductRepository")
  15.  */
  16. class DnsitProduct
  17. {
  18.     /**
  19.      * @var string|null
  20.      *
  21.      * @ORM\Column(name="product_text_key", type="string", length=255, nullable=true, unique=true)
  22.      */
  23.     private $productTextKey;
  24.     /**
  25.      * @var string|null
  26.      *
  27.      * @ORM\Column(name="name", type="string", length=255, nullable=true)
  28.      */
  29.     private $name;
  30.     /**
  31.      * @var string|null
  32.      *
  33.      * @ORM\Column(name="slug", type="string", length=255, nullable=true)
  34.      */
  35.     private $slug;
  36.     /**
  37.      * @var int|null
  38.      *
  39.      * @ORM\Column(name="product_code", type="bigint", nullable=true, unique=true)
  40.      */
  41.     private $productCode;
  42.     /**
  43.      * @var int|null
  44.      *
  45.      * @ORM\Column(name="product_type_code", type="bigint", nullable=true)
  46.      */
  47.     private $productTypeCode;
  48.     /**
  49.      * @var string|null
  50.      *
  51.      * @ORM\Column(name="type_name", type="string", nullable=true)
  52.      */
  53.     private $typeName;
  54.     /**
  55.      * @var string|null
  56.      *
  57.      * @ORM\Column(name="dn_reference", type="string", nullable=true)
  58.      */
  59.     private $reference;
  60.     /**
  61.      * @var string|null
  62.      *
  63.      * @ORM\Column(name="comment", type="text", nullable=true)
  64.      */
  65.     private $comment;
  66.     /**
  67.      * @var float|null
  68.      *
  69.      * @ORM\Column(name="latitude", type="float", nullable=true)
  70.      */
  71.     private $latitude;
  72.     /**
  73.      * @var float|null
  74.      *
  75.      * @ORM\Column(name="longitude", type="float", nullable=true)
  76.      */
  77.     private $longitude;
  78.     /**
  79.      * @var int|null
  80.      *
  81.      * @ORM\Column(name="georef_type", type="integer", nullable=true)
  82.      */
  83.     private $georefType;
  84.     /**
  85.      * @var int|null
  86.      *
  87.      * @ORM\Column(name="georef", type="integer", nullable=true)
  88.      */
  89.     private $georef;
  90.     /**
  91.      * @var float|null
  92.      *
  93.      * @ORM\Column(name="distance", type="float", nullable=true)
  94.      */
  95.     private $distance;
  96.     /**
  97.      * @var float|null
  98.      *
  99.      * @ORM\Column(name="score", type="float", nullable=true)
  100.      */
  101.     private $score;
  102.     /**
  103.      * @var string|null
  104.      *
  105.      * @ORM\Column(name="location_name", type="string", length=255, nullable=true)
  106.      */
  107.     private $locationName;
  108.     /**
  109.      * @var string|null
  110.      *
  111.      * @ORM\Column(name="street_num", type="string", length=255, nullable=true)
  112.      */
  113.     private $streetNumber;
  114.     /**
  115.      * @var string|null
  116.      *
  117.      * @ORM\Column(name="street_name", type="string", length=255, nullable=true)
  118.      */
  119.     private $streetName;
  120.     /**
  121.      * @var string|null
  122.      *
  123.      * @ORM\Column(name="addition_address", type="string", length=255, nullable=true)
  124.      */
  125.     private $additionAddress;
  126.     /**
  127.      * @var string|null
  128.      *
  129.      * @ORM\Column(name="special_distribution_address", type="string", length=500, nullable=true)
  130.      */
  131.     private $specialDistributionAddress;
  132.     /**
  133.      * @var string|null
  134.      *
  135.      * @ORM\Column(name="address", type="string", length=1000, nullable=true)
  136.      */
  137.     private $address;
  138.     /**
  139.      * @var string|null
  140.      *
  141.      * @ORM\Column(name="zip_code", type="string",  length=255, nullable=true)
  142.      */
  143.     private $zipCode;
  144.     /**
  145.      * @var string|null
  146.      *
  147.      * @ORM\Column(name="insee", type="string",  length=255, nullable=true)
  148.      */
  149.     private $insee;
  150.     /**
  151.      * @var string|null
  152.      *
  153.      * @ORM\Column(name="city", type="string", length=255, nullable=true)
  154.      */
  155.     private $city;
  156.     /**
  157.      * @var string|null
  158.      *
  159.      * @ORM\Column(name="country", type="string", length=255, nullable=true)
  160.      */
  161.     private $country;
  162.     /**
  163.      * @var string|null
  164.      *
  165.      * @ORM\Column(name="phone", type="string", length=255, nullable=true)
  166.      */
  167.     private $phone;
  168.     /**
  169.      * @var string|null
  170.      *
  171.      * @ORM\Column(name="phone2", type="string", length=255, nullable=true)
  172.      */
  173.     private $phone2;
  174.     /**
  175.      * @var string|null
  176.      *
  177.      * @ORM\Column(name="phone3", type="string", length=255, nullable=true)
  178.      */
  179.     private $phone3;
  180.     /**
  181.      * @var string|null
  182.      *
  183.      * @ORM\Column(name="fax", type="string", length=255, nullable=true)
  184.      */
  185.     private $fax;
  186.     /**
  187.      * @var string|null
  188.      *
  189.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  190.      */
  191.     private $email;
  192.     /**
  193.      * @var string|null
  194.      *
  195.      * @ORM\Column(name="email2", type="string", length=255, nullable=true)
  196.      */
  197.     private $email2;
  198.     /**
  199.      * @var string|null
  200.      *
  201.      * @ORM\Column(name="url", type="text", nullable=true)
  202.      */
  203.     private $url;
  204.     /**
  205.      * @var string|null
  206.      *
  207.      * @ORM\Column(name="url2", type="text", nullable=true)
  208.      */
  209.     private $url2;
  210.     /**
  211.      * @var int|null
  212.      *
  213.      * @ORM\Column(name="entity_manager", type="bigint", nullable=true)
  214.      */
  215.     private $entityManager;
  216.     /**
  217.      * @var int|null
  218.      *
  219.      * @ORM\Column(name="provider_code", type="bigint", nullable=true)
  220.      */
  221.     private $providerCode;
  222.     /**
  223.      * @var string|null
  224.      *
  225.      * @ORM\Column(name="provider_text_key", type="text", nullable=true)
  226.      */
  227.     private $providerTextKey;
  228.     /**
  229.      * @var string|null
  230.      *
  231.      * @ORM\Column(name="provider_name", type="string", length=255, nullable=true)
  232.      */
  233.     private $providerName;
  234.     /**
  235.      * @var string|null
  236.      *
  237.      * @ORM\Column(name="provider_civility", type="string", length=255, nullable=true)
  238.      */
  239.     private $providerCivility;
  240.     /**
  241.      * @var string|null
  242.      *
  243.      * @ORM\Column(name="provider_responsible_name", type="string", length=255, nullable=true)
  244.      */
  245.     private $providerResponsibleName;
  246.     /**
  247.      * @var string|null
  248.      *
  249.      * @ORM\Column(name="provider_responsible_firstname", type="string", length=255, nullable=true)
  250.      */
  251.     private $providerResponsibleFirstname;
  252.     /**
  253.      * @var string|null
  254.      *
  255.      * @ORM\Column(name="provider_location_name", type="string", length=255, nullable=true)
  256.      */
  257.     private $providerLocationName;
  258.     /**
  259.      * @var string|null
  260.      *
  261.      * @ORM\Column(name="provider_street_number", type="string", length=255, nullable=true)
  262.      */
  263.     private $providerStreetNumber;
  264.     /**
  265.      * @var string|null
  266.      *
  267.      * @ORM\Column(name="provider_street_name", type="string", length=255, nullable=true)
  268.      */
  269.     private $providerStreetName;
  270.     /**
  271.      * @var string|null
  272.      *
  273.      * @ORM\Column(name="provider_addition_address", type="string", length=255, nullable=true)
  274.      */
  275.     private $providerAdditionAddress;
  276.     /**
  277.      * @var string|null
  278.      *
  279.      * @ORM\Column(name="provider_zip_code", type="string", length=255, nullable=true)
  280.      */
  281.     private $providerZipCode;
  282.     /**
  283.      * @var string|null
  284.      *
  285.      * @ORM\Column(name="provider_city", type="string", length=255, nullable=true)
  286.      */
  287.     private $providerCity;
  288.     /**
  289.      * @var string|null
  290.      *
  291.      * @ORM\Column(name="provider_country", type="string", length=255, nullable=true)
  292.      */
  293.     private $providerCountry;
  294.     /**
  295.      * @var string|null
  296.      *
  297.      * @ORM\Column(name="provider_phone", type="string", length=255, nullable=true)
  298.      */
  299.     private $providerPhone;
  300.     /**
  301.      * @var string|null
  302.      *
  303.      * @ORM\Column(name="provider_phone2", type="string", length=255, nullable=true)
  304.      */
  305.     private $providerPhone2;
  306.     /**
  307.      * @var string|null
  308.      *
  309.      * @ORM\Column(name="provider_phone3", type="string", length=255, nullable=true)
  310.      */
  311.     private $providerPhone3;
  312.     /**
  313.      * @var string|null
  314.      *
  315.      * @ORM\Column(name="provider_fax", type="string", length=255, nullable=true)
  316.      */
  317.     private $providerFax;
  318.     /**
  319.      * @var string|null
  320.      *
  321.      * @ORM\Column(name="provider_email", type="string", length=255, nullable=true)
  322.      */
  323.     private $providerEmail;
  324.     /**
  325.      * @var string|null
  326.      *
  327.      * @ORM\Column(name="provider_email2", type="string", length=255, nullable=true)
  328.      */
  329.     private $providerEmail2;
  330.     /**
  331.      * @var string|null
  332.      *
  333.      * @ORM\Column(name="provider_url", type="string", length=255, nullable=true)
  334.      */
  335.     private $providerUrl;
  336.     /**
  337.      * @var string|null
  338.      *
  339.      * @ORM\Column(name="provider_url2", type="string", length=255, nullable=true)
  340.      */
  341.     private $providerUrl2;
  342.     /**
  343.      * @var string|null
  344.      *
  345.      * @ORM\Column(name="provider_special_distribution", type="string", length=255, nullable=true)
  346.      */
  347.     private $providerSpecialDistribution;
  348.     /**
  349.      * @var string|null
  350.      *
  351.      * @ORM\Column(name="contact_civility", type="string", length=255, nullable=true)
  352.      */
  353.     private $contactCivility;
  354.     /**
  355.      * @var string|null
  356.      *
  357.      * @ORM\Column(name="contact_lastname", type="string", length=255, nullable=true)
  358.      */
  359.     private $contactLastname;
  360.     /**
  361.      * @var string|null
  362.      *
  363.      * @ORM\Column(name="contact_firstname", type="string", length=255, nullable=true)
  364.      */
  365.     private $contactFirstName;
  366.     /**
  367.      * @var string|null
  368.      *
  369.      * @ORM\Column(name="manager_civility", type="string", length=255, nullable=true)
  370.      */
  371.     private $managerCivility;
  372.     /**
  373.      * @var string|null
  374.      *
  375.      * @ORM\Column(name="manager_lastname", type="string", length=255, nullable=true)
  376.      */
  377.     private $managerLastname;
  378.     /**
  379.      * @var string|null
  380.      *
  381.      * @ORM\Column(name="manager_firstname", type="string", length=255, nullable=true)
  382.      */
  383.     private $managerFirstName;
  384.     /**
  385.      * @var string|null
  386.      *
  387.      * @ORM\Column(name="manager_street_number", type="string", length=255, nullable=true)
  388.      */
  389.     private $managerStreetNumber;
  390.     /**
  391.      * @var string|null
  392.      *
  393.      * @ORM\Column(name="manager_street_name", type="string", length=255, nullable=true)
  394.      */
  395.     private $managerStreetName;
  396.     /**
  397.      * @var string|null
  398.      *
  399.      * @ORM\Column(name="manager_addition_address", type="string", length=255, nullable=true)
  400.      */
  401.     private $managerAdditionAddress;
  402.     /**
  403.      * @var string|null
  404.      *
  405.      * @ORM\Column(name="manager_zip_code", type="string", length=255, nullable=true)
  406.      */
  407.     private $managerZipCode;
  408.     /**
  409.      * @var string|null
  410.      *
  411.      * @ORM\Column(name="manager_city", type="string", length=255, nullable=true)
  412.      */
  413.     private $managerCity;
  414.     /**
  415.      * @var string|null
  416.      *
  417.      * @ORM\Column(name="manager_country", type="string", length=255, nullable=true)
  418.      */
  419.     private $managerCountry;
  420.     /**
  421.      * @var string|null
  422.      *
  423.      * @ORM\Column(name="manager_phone", type="string", length=255, nullable=true)
  424.      */
  425.     private $managerPhone;
  426.     /**
  427.      * @var string|null
  428.      *
  429.      * @ORM\Column(name="manager_phone2", type="string", length=255, nullable=true)
  430.      */
  431.     private $managerPhone2;
  432.     /**
  433.      * @var string|null
  434.      *
  435.      * @ORM\Column(name="manager_phone3", type="string", length=255, nullable=true)
  436.      */
  437.     private $managerPhone3;
  438.     /**
  439.      * @var string|null
  440.      *
  441.      * @ORM\Column(name="manager_fax", type="string", length=255, nullable=true)
  442.      */
  443.     private $managerFax;
  444.     /**
  445.      * @var string|null
  446.      *
  447.      * @ORM\Column(name="manager_email", type="string", length=255, nullable=true)
  448.      */
  449.     private $managerEmail;
  450.     /**
  451.      * @var string|null
  452.      *
  453.      * @ORM\Column(name="manager_email2", type="string", length=255, nullable=true)
  454.      */
  455.     private $managerEmail2;
  456.     /**
  457.      * @var string|null
  458.      *
  459.      * @ORM\Column(name="manager_url", type="text", nullable=true)
  460.      */
  461.     private $managerUrl;
  462.     /**
  463.      * @var string|null
  464.      *
  465.      * @ORM\Column(name="manager_url2", type="text", nullable=true)
  466.      */
  467.     private $managerUrl2;
  468.     /**
  469.      * @var string|null
  470.      *
  471.      * @ORM\Column(name="manager_special_distribution", type="string", length=255, nullable=true)
  472.      */
  473.     private $managerSpecialDistribution;
  474.     /**
  475.      * @var string|null
  476.      *
  477.      * @ORM\Column(name="internal_comment", type="text", nullable=true)
  478.      */
  479.     private $internalComment;
  480.     /**
  481.      * @var string|null
  482.      *
  483.      * @ORM\Column(name="comment1", type="text", nullable=true)
  484.      */
  485.     private $comment1;
  486.     /**
  487.      * @var string|null
  488.      *
  489.      * @ORM\Column(name="comment2", type="text", nullable=true)
  490.      */
  491.     private $comment2;
  492.     /**
  493.      * @ORM\Column(type="text", nullable=true)
  494.      */
  495.     private $comment7;
  496.     /**
  497.      * @ORM\Column(type="text", nullable=true)
  498.      */
  499.     private $comment8;
  500.     /**
  501.      * @ORM\Column(type="text", nullable=true)
  502.      */
  503.     private $comment9;
  504.     /**
  505.      * @var string|null
  506.      *
  507.      * @ORM\Column(name="comment_html", type="text", nullable=true)
  508.      */
  509.     private $commentHtml;
  510.     /**
  511.      * @ORM\Column(type="text", nullable=true)
  512.      */
  513.     private $commentHtml2;
  514.     /**
  515.      * @ORM\Column(type="text", nullable=true)
  516.      */
  517.     private $commentHtml3;
  518.     /**
  519.      * @var string|null
  520.      *
  521.      * @ORM\Column(name="memo1", type="text", nullable=true)
  522.      */
  523.     private $memo1;
  524.     /**
  525.      * @var string|null
  526.      *
  527.      * @ORM\Column(name="memo2", type="text", nullable=true)
  528.      */
  529.     private $memo2;
  530.     /**
  531.      * @var string|null
  532.      *
  533.      * @ORM\Column(name="memo3", type="text", nullable=true)
  534.      */
  535.     private $memo3;
  536.     /**
  537.      * @var string|null
  538.      *
  539.      * @ORM\Column(name="documentationf", type="text", nullable=true)
  540.      */
  541.     private $documentationf;
  542.     /**
  543.      * @var string|null
  544.      *
  545.      * @ORM\Column(name="documentationl1", type="text", nullable=true)
  546.      */
  547.     private $documentationl1;
  548.     /**
  549.      * @var string|null
  550.      *
  551.      * @ORM\Column(name="documentationl2", type="text", nullable=true)
  552.      */
  553.     private $documentationl2;
  554.     /**
  555.      * @var string|null
  556.      *
  557.      * @ORM\Column(name="kml", type="text", nullable=true)
  558.      */
  559.     private $kml;
  560.     /**
  561.      *
  562.      * @ORM\Column(name="geo_point", type="geometry", options={"geometry_type":"POINT"}, nullable=true)
  563.      */
  564.     private $geoPoint;
  565.     /**
  566.      *
  567.      * @ORM\Column(name="geo_linestring", type="geometry", options={"geometry_type":"LINESTRING"}, nullable=true)
  568.      */
  569.     private $geoLinestring;
  570.     /**
  571.      * @var int|null
  572.      *
  573.      * @ORM\Column(name="entite", type="bigint", nullable=true)
  574.      */
  575.     private $entite;
  576.     /**
  577.      * @var int|null
  578.      *
  579.      * @ORM\Column(name="marking", type="smallint", nullable=true)
  580.      */
  581.     private $marking;
  582.     /**
  583.      * @var string|null
  584.      *
  585.      * @ORM\Column(name="params", type="json", nullable=true)
  586.      */
  587.     private $params;
  588.     /**
  589.      * @var bool|null
  590.      *
  591.      * @ORM\Column(name="is_valid", type="boolean", nullable=true)
  592.      */
  593.     private $isValid;
  594.     /**
  595.      * @var \DateTime|null
  596.      *
  597.      * @ORM\Column(name="valid_from", type="date", nullable=true)
  598.      */
  599.     private $validFrom;
  600.     /**
  601.      * @var \DateTime|null
  602.      *
  603.      * @ORM\Column(name="valid_to", type="date", nullable=true)
  604.      */
  605.     private $validTo;
  606.     /**
  607.      * @var \DateTime|null
  608.      *
  609.      * @ORM\Column(name="max_update", type="datetime", nullable=true)
  610.      */
  611.     private $maxUpdate;
  612.     /**
  613.      * @var \DateTime|null
  614.      *
  615.      * @ORM\Column(name="created_at", type="datetime", nullable=true)
  616.      */
  617.     private $createdAt;
  618.     /**
  619.      * @var int|null
  620.      *
  621.      * @ORM\Column(name="created_by", type="bigint", nullable=true)
  622.      */
  623.     private $created_by;
  624.     /**
  625.      * @var \DateTime|null
  626.      *
  627.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  628.      */
  629.     private $updatedAt;
  630.     /**
  631.      * @var int|null
  632.      *
  633.      * @ORM\Column(name="updated_by", type="bigint", nullable=true)
  634.      */
  635.     private $updatedBy;
  636.     /**
  637.      * @var int|null
  638.      *
  639.      * @ORM\Column(name="alea", type="bigint", nullable=true)
  640.      */
  641.     private $alea;
  642.     /**
  643.      * @var string|null
  644.      *
  645.      * @ORM\Column(name="document", type="text", nullable=true)
  646.      */
  647.     private $document;
  648.     /**
  649.      * @var int
  650.      *
  651.      * @ORM\Column(name="id", type="bigint")
  652.      * @ORM\Id
  653.      * @ORM\GeneratedValue(strategy="IDENTITY")
  654.      */
  655.     private $id;
  656.     /**
  657.      * @var \App\Entity\DnsitEntity
  658.      *
  659.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitEntity")
  660.      * @ORM\JoinColumns({
  661.      *   @ORM\JoinColumn(name="entity_id", referencedColumnName="id")
  662.      * })
  663.      */
  664.     private $productEntity;
  665.     /**
  666.      * @var \Doctrine\Common\Collections\Collection
  667.      *
  668.      * @ORM\OneToMany(targetEntity="App\Entity\DnsitProductCriterion", mappedBy="product", cascade={"persist","remove"})
  669.      */
  670.     private $productCriterions;
  671.     /**
  672.      * @var \Doctrine\Common\Collections\Collection
  673.      *
  674.      * @ORM\OneToMany(targetEntity="App\Entity\CacheTemp", mappedBy="product", cascade={"persist"})
  675.      */
  676.     private $cacheTemps;
  677.     /**
  678.      * @var \Doctrine\Common\Collections\Collection
  679.      *
  680.      * @ORM\OneToMany(targetEntity="App\Entity\DnsitHour", mappedBy="product", cascade={"persist"})
  681.      */
  682.     private $hours;
  683.     /**
  684.      * @var \Doctrine\Common\Collections\Collection
  685.      *
  686.      * @ORM\OneToMany(targetEntity="App\Entity\DnsitShortHour", mappedBy="product", cascade={"persist"})
  687.      */
  688.     private $shortHours;
  689.     /**
  690.      * @var \Doctrine\Common\Collections\Collection
  691.      *
  692.      * @ORM\OneToMany(targetEntity="App\Entity\DnsitCoupledProduct", mappedBy="product", cascade={"persist"})
  693.      */
  694.     private $coupledProducts;
  695.     /**
  696.      * @var \Doctrine\Common\Collections\Collection
  697.      *
  698.      * @ORM\OneToMany(targetEntity="App\Entity\DnsitCoupledProduct", mappedBy="coupledProduct", cascade={"persist"})
  699.      */
  700.     private $coupledCoupledProducts;
  701.     /**
  702.      * @var \App\Entity\DnsitType
  703.      *
  704.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitType")
  705.      * @ORM\JoinColumns({
  706.      *   @ORM\JoinColumn(name="type_id", referencedColumnName="id")
  707.      * })
  708.      */
  709.     private $type;
  710.     /**
  711.      * @var \App\Entity\CityInsee
  712.      *
  713.      * @ORM\ManyToOne(targetEntity="App\Entity\CityInsee")
  714.      * @ORM\JoinColumns({
  715.      *   @ORM\JoinColumn(name="city_insee_id", referencedColumnName="id")
  716.      * })
  717.      */
  718.     private $cityInsee;
  719.     /**
  720.      * @var \App\Entity\DnsitTranslateProduct
  721.      *
  722.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitTranslateProduct")
  723.      * @ORM\JoinColumns({
  724.      *   @ORM\JoinColumn(name="translate_id", referencedColumnName="id", onDelete="SET NULL")
  725.      * })
  726.      */
  727.     private $translate;
  728.     /**
  729.      * @var \Doctrine\Common\Collections\Collection
  730.      *
  731.      * @ORM\ManyToMany(targetEntity="App\Entity\DnsitProductCategory", inversedBy="products")
  732.      * @ORM\JoinTable(name="productCategory",
  733.      *   joinColumns={
  734.      *     @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  735.      *   },
  736.      *   inverseJoinColumns={
  737.      *     @ORM\JoinColumn(name="category_id", referencedColumnName="id")
  738.      *   }
  739.      * )
  740.      */
  741.     private $category;
  742.     /**
  743.      * @ORM\OneToMany(targetEntity="App\Entity\DnsitProductDispo", mappedBy="product", orphanRemoval=true)
  744.      */
  745.     private $dispos;
  746.     /**
  747.      * @var \Doctrine\Common\Collections\Collection
  748.      * @ORM\OneToMany(targetEntity="App\Entity\WebFilterResult", mappedBy="product", orphanRemoval=true)
  749.      */
  750.     private $webFilterResults;
  751.     private $parameters;
  752.     /**
  753.      * Constructor
  754.      */
  755.     public function __construct()
  756.     {
  757.         $this->productCriterions = new \Doctrine\Common\Collections\ArrayCollection();
  758.         $this->cacheTemps = new \Doctrine\Common\Collections\ArrayCollection();
  759.         $this->hours = new \Doctrine\Common\Collections\ArrayCollection();
  760.         $this->shortHours = new \Doctrine\Common\Collections\ArrayCollection();
  761.         $this->coupledProducts = new \Doctrine\Common\Collections\ArrayCollection();
  762.         $this->coupledCoupledProducts = new \Doctrine\Common\Collections\ArrayCollection();
  763.         $this->category = new \Doctrine\Common\Collections\ArrayCollection();
  764.         $this->dispos = new ArrayCollection();
  765.         $this->webFilterResults = new ArrayCollection();
  766.     }
  767.     public static function getEntityForLan($language)
  768.     {
  769.         switch (strtolower($language)) {
  770.             case "en":
  771.                 $repository "DnsitEnProduct";
  772.                 $productClass "\App\Entity\DnsitEnProduct";
  773.                 break;
  774.             case "de":
  775.                 $repository "DnsitDeProduct";
  776.                 $productClass "\App\Entity\DnsitDeProduct";
  777.                 break;
  778.             case "nl":
  779.                 $repository "DnsitNlProduct";
  780.                 $productClass "\App\Entity\DnsitNlProduct";
  781.                 break;
  782.             case "it":
  783.                 $repository "DnsitItProduct";
  784.                 $productClass "\App\Entity\DnsitItProduct";
  785.                 break;
  786.             case "es":
  787.                 $repository "DnsitEsProduct";
  788.                 $productClass "\App\Entity\DnsitEsProduct";
  789.                 break;
  790.             default :
  791.                 $repository "DnsitProduct";
  792.                 $productClass "\App\Entity\DnsitProduct";
  793.                 break;
  794.         }
  795.         return $repository;
  796.     }
  797.     public function getProductTextKey(): ?string
  798.     {
  799.         return $this->productTextKey;
  800.     }
  801.     public function setProductTextKey(?string $productTextKey): self
  802.     {
  803.         $this->productTextKey $productTextKey;
  804.         return $this;
  805.     }
  806.     public function getProductCode(): ?int
  807.     {
  808.         return $this->productCode;
  809.     }
  810.     public function setProductCode(?int $productCode): self
  811.     {
  812.         $this->productCode $productCode;
  813.         return $this;
  814.     }
  815.     public function getProductTypeCode(): ?int
  816.     {
  817.         return $this->productTypeCode;
  818.     }
  819.     public function setProductTypeCode(?int $productTypeCode): self
  820.     {
  821.         $this->productTypeCode $productTypeCode;
  822.         return $this;
  823.     }
  824.     public function getTypeName(): ?string
  825.     {
  826.         return $this->typeName;
  827.     }
  828.     public function setTypeName(?string $typeName): self
  829.     {
  830.         $this->typeName $typeName;
  831.         return $this;
  832.     }
  833.     public function getReference(): ?string
  834.     {
  835.         return $this->reference;
  836.     }
  837.     public function setReference(?string $reference): self
  838.     {
  839.         $this->reference $reference;
  840.         return $this;
  841.     }
  842.     public function getComment(): ?string
  843.     {
  844.         return $this->comment;
  845.     }
  846.     public function setComment(?string $comment): self
  847.     {
  848.         $this->comment $comment;
  849.         return $this;
  850.     }
  851.     public function getGeorefType(): ?int
  852.     {
  853.         return $this->georefType;
  854.     }
  855.     public function setGeorefType(?int $georefType): self
  856.     {
  857.         $this->georefType $georefType;
  858.         return $this;
  859.     }
  860.     public function getGeoref(): ?int
  861.     {
  862.         return $this->georef;
  863.     }
  864.     public function setGeoref(?int $georef): self
  865.     {
  866.         $this->georef $georef;
  867.         return $this;
  868.     }
  869.     public function getDistance(): ?float
  870.     {
  871.         return $this->distance;
  872.     }
  873.     public function setDistance(?float $distance): self
  874.     {
  875.         $this->distance $distance;
  876.         return $this;
  877.     }
  878.     public function getScore(): ?float
  879.     {
  880.         return $this->score;
  881.     }
  882.     public function setScore(?float $score): self
  883.     {
  884.         $this->score $score;
  885.         return $this;
  886.     }
  887.     public function getLocationName(): ?string
  888.     {
  889.         return $this->locationName;
  890.     }
  891.     public function setLocationName(?string $locationName): self
  892.     {
  893.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  894.         if (!empty($locationName) && strlen($locationName) > 255)
  895.             return $this;
  896.         $this->locationName $locationName;
  897.         return $this;
  898.     }
  899.     public function getStreetNumber(): ?string
  900.     {
  901.         return $this->streetNumber;
  902.     }
  903.     public function setStreetNumber(?string $streetNumber): self
  904.     {
  905.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  906.         if (!empty($streetNumber) && strlen($streetNumber) > 255)
  907.             return $this;
  908.         $this->streetNumber $streetNumber;
  909.         return $this;
  910.     }
  911.     public function getStreetName(): ?string
  912.     {
  913.         return $this->streetName;
  914.     }
  915.     public function setStreetName(?string $streetName): self
  916.     {
  917.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  918.         if (!empty($streetName) && strlen($streetName) > 255)
  919.             return $this;
  920.         $this->streetName $streetName;
  921.         return $this;
  922.     }
  923.     public function getAdditionAddress(): ?string
  924.     {
  925.         return $this->additionAddress;
  926.     }
  927.     public function setAdditionAddress(?string $additionAddress): self
  928.     {
  929.         $this->additionAddress $additionAddress;
  930.         return $this;
  931.     }
  932.     public function getSpecialDistributionAddress(): ?string
  933.     {
  934.         return $this->specialDistributionAddress;
  935.     }
  936.     public function setSpecialDistributionAddress(?string $specialDistributionAddress): self
  937.     {
  938.         $this->specialDistributionAddress $specialDistributionAddress;
  939.         return $this;
  940.     }
  941.     public function getAddress(): ?string
  942.     {
  943.         return $this->address;
  944.     }
  945.     public function setAddress(?string $address): self
  946.     {
  947.         $this->address $address;
  948.         return $this;
  949.     }
  950.     public function getZipCode(): ?string
  951.     {
  952.         return $this->zipCode;
  953.     }
  954.     public function setZipCode(?string $zipCode): self
  955.     {
  956.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  957.         if (!empty($zipCode) && strlen($zipCode) > 255)
  958.             return $this;
  959.         $this->zipCode $zipCode;
  960.         return $this;
  961.     }
  962.     public function getInsee(): ?string
  963.     {
  964.         return $this->insee;
  965.     }
  966.     public function setInsee(?string $insee): self
  967.     {
  968.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  969.         if (!empty($insee) && strlen($insee) > 255)
  970.             return $this;
  971.         $this->insee $insee;
  972.         return $this;
  973.     }
  974.     public function getCity(): ?string
  975.     {
  976.         return $this->city;
  977.     }
  978.     public function setCity(?string $city): self
  979.     {
  980.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  981.         if (!empty($city) && strlen($city) > 255)
  982.             return $this;
  983.         $this->city $city;
  984.         return $this;
  985.     }
  986.     public function getCountry(): ?string
  987.     {
  988.         return $this->country;
  989.     }
  990.     public function setCountry(?string $country): self
  991.     {
  992.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  993.         if (!empty($country) && strlen($country) > 255)
  994.             return $this;
  995.         $this->country $country;
  996.         return $this;
  997.     }
  998.     public function getPhone(): ?string
  999.     {
  1000.         return $this->phone;
  1001.     }
  1002.     public function setPhone(?string $phone): self
  1003.     {
  1004.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1005.         if (!empty($phone) && strlen($phone) > 255)
  1006.             return $this;
  1007.         $this->phone $phone;
  1008.         return $this;
  1009.     }
  1010.     public function getPhone2(): ?string
  1011.     {
  1012.         return $this->phone2;
  1013.     }
  1014.     public function setPhone2(?string $phone2): self
  1015.     {
  1016.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1017.         if (!empty($phone2) && strlen($phone2) > 255)
  1018.             return $this;
  1019.         $this->phone2 $phone2;
  1020.         return $this;
  1021.     }
  1022.     public function getPhone3(): ?string
  1023.     {
  1024.         return $this->phone3;
  1025.     }
  1026.     public function setPhone3(?string $phone3): self
  1027.     {
  1028.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1029.         if (!empty($phone3) && strlen($phone3) > 255)
  1030.             return $this;
  1031.         $this->phone3 $phone3;
  1032.         return $this;
  1033.     }
  1034.     public function getFax(): ?string
  1035.     {
  1036.         return $this->fax;
  1037.     }
  1038.     public function setFax(?string $fax): self
  1039.     {
  1040.         $this->fax $fax;
  1041.         return $this;
  1042.     }
  1043.     public function getEmail(): ?string
  1044.     {
  1045.         return $this->email;
  1046.     }
  1047.     public function setEmail(?string $email): self
  1048.     {
  1049.         $this->email $email;
  1050.         return $this;
  1051.     }
  1052.     public function getEmail2(): ?string
  1053.     {
  1054.         return $this->email2;
  1055.     }
  1056.     public function setEmail2(?string $email2): self
  1057.     {
  1058.         $this->email2 $email2;
  1059.         return $this;
  1060.     }
  1061.     public function getUrl(): ?string
  1062.     {
  1063.         return $this->url;
  1064.     }
  1065.     public function setUrl(?string $url): self
  1066.     {
  1067.         $this->url $url;
  1068.         return $this;
  1069.     }
  1070.     public function getUrl2(): ?string
  1071.     {
  1072.         return $this->url2;
  1073.     }
  1074.     public function setUrl2(?string $url2): self
  1075.     {
  1076.         $this->url2 $url2;
  1077.         return $this;
  1078.     }
  1079.     public function getEntityManager(): ?int
  1080.     {
  1081.         return $this->entityManager;
  1082.     }
  1083.     public function setEntityManager(?int $entityManager): self
  1084.     {
  1085.         $this->entityManager $entityManager;
  1086.         return $this;
  1087.     }
  1088.     public function getProviderCode(): ?int
  1089.     {
  1090.         return $this->providerCode;
  1091.     }
  1092.     public function setProviderCode(?int $providerCode): self
  1093.     {
  1094.         $this->providerCode $providerCode;
  1095.         return $this;
  1096.     }
  1097.     public function getProviderName(): ?string
  1098.     {
  1099.         return $this->providerName;
  1100.     }
  1101.     public function setProviderName(?string $providerName): self
  1102.     {
  1103.         $this->providerName $providerName;
  1104.         return $this;
  1105.     }
  1106.     public function getProviderCivility(): ?string
  1107.     {
  1108.         return $this->providerCivility;
  1109.     }
  1110.     public function setProviderCivility(?string $providerCivility): self
  1111.     {
  1112.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1113.         if (!empty($providerCivility) && strlen($providerCivility) > 255)
  1114.             return $this;
  1115.         $this->providerCivility $providerCivility;
  1116.         return $this;
  1117.     }
  1118.     public function getProviderResponsibleName(): ?string
  1119.     {
  1120.         return $this->providerResponsibleName;
  1121.     }
  1122.     public function setProviderResponsibleName(?string $providerResponsibleName): self
  1123.     {
  1124.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1125.         if (!empty($providerResponsibleName) && strlen($providerResponsibleName) > 255)
  1126.             return $this;
  1127.         $this->providerResponsibleName $providerResponsibleName;
  1128.         return $this;
  1129.     }
  1130.     public function getProviderResponsibleFirstname(): ?string
  1131.     {
  1132.         return $this->providerResponsibleFirstname;
  1133.     }
  1134.     public function setProviderResponsibleFirstname(?string $providerResponsibleFirstname): self
  1135.     {
  1136.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1137.         if (!empty($providerResponsibleFirstname) && strlen($providerResponsibleFirstname) > 255)
  1138.             return $this;
  1139.         $this->providerResponsibleFirstname $providerResponsibleFirstname;
  1140.         return $this;
  1141.     }
  1142.     public function getProviderLocationName(): ?string
  1143.     {
  1144.         return $this->providerLocationName;
  1145.     }
  1146.     public function setProviderLocationName(?string $providerLocationName): self
  1147.     {
  1148.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1149.         if (!empty($providerLocationName) && strlen($providerLocationName) > 255)
  1150.             return $this;
  1151.         $this->providerLocationName $providerLocationName;
  1152.         return $this;
  1153.     }
  1154.     public function getProviderStreetNumber(): ?string
  1155.     {
  1156.         return $this->providerStreetNumber;
  1157.     }
  1158.     public function setProviderStreetNumber(?string $providerStreetNumber): self
  1159.     {
  1160.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1161.         if (!empty($providerStreetNumber) && strlen($providerStreetNumber) > 255)
  1162.             return $this;
  1163.         $this->providerStreetNumber $providerStreetNumber;
  1164.         return $this;
  1165.     }
  1166.     public function getProviderStreetName(): ?string
  1167.     {
  1168.         return $this->providerStreetName;
  1169.     }
  1170.     public function setProviderStreetName(?string $providerStreetName): self
  1171.     {
  1172.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1173.         if (!empty($providerStreetName) && strlen($providerStreetName) > 255)
  1174.             return $this;
  1175.         $this->providerStreetName $providerStreetName;
  1176.         return $this;
  1177.     }
  1178.     public function getProviderAdditionAddress(): ?string
  1179.     {
  1180.         return $this->providerAdditionAddress;
  1181.     }
  1182.     public function setProviderAdditionAddress(?string $providerAdditionAddress): self
  1183.     {
  1184.         $this->providerAdditionAddress $providerAdditionAddress;
  1185.         return $this;
  1186.     }
  1187.     public function getProviderZipCode(): ?string
  1188.     {
  1189.         return $this->providerZipCode;
  1190.     }
  1191.     public function setProviderZipCode(?string $providerZipCode): self
  1192.     {
  1193.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1194.         if (!empty($providerZipCode) && strlen($providerZipCode) > 255)
  1195.             return $this;
  1196.         $this->providerZipCode $providerZipCode;
  1197.         return $this;
  1198.     }
  1199.     public function getProviderCity(): ?string
  1200.     {
  1201.         return $this->providerCity;
  1202.     }
  1203.     public function setProviderCity(?string $providerCity): self
  1204.     {
  1205.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1206.         if (!empty($providerCity) && strlen($providerCity) > 255)
  1207.             return $this;
  1208.         $this->providerCity $providerCity;
  1209.         return $this;
  1210.     }
  1211.     public function getProviderCountry(): ?string
  1212.     {
  1213.         return $this->providerCountry;
  1214.     }
  1215.     public function setProviderCountry(?string $providerCountry): self
  1216.     {
  1217.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1218.         if (!empty($providerCountry) && strlen($providerCountry) > 255)
  1219.             return $this;
  1220.         $this->providerCountry $providerCountry;
  1221.         return $this;
  1222.     }
  1223.     public function getProviderPhone(): ?string
  1224.     {
  1225.         return $this->providerPhone;
  1226.     }
  1227.     public function setProviderPhone(?string $providerPhone): self
  1228.     {
  1229.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1230.         if (!empty($providerPhone) && strlen($providerPhone) > 255)
  1231.             return $this;
  1232.         $this->providerPhone $providerPhone;
  1233.         return $this;
  1234.     }
  1235.     public function getProviderPhone2(): ?string
  1236.     {
  1237.         return $this->providerPhone2;
  1238.     }
  1239.     public function setProviderPhone2(?string $providerPhone2): self
  1240.     {
  1241.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1242.         if (!empty($providerPhone2) && strlen($providerPhone2) > 255)
  1243.             return $this;
  1244.         $this->providerPhone2 $providerPhone2;
  1245.         return $this;
  1246.     }
  1247.     public function getProviderPhone3(): ?string
  1248.     {
  1249.         return $this->providerPhone3;
  1250.     }
  1251.     public function setProviderPhone3(?string $providerPhone3): self
  1252.     {
  1253.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1254.         if (!empty($providerPhone3) && strlen($providerPhone3) > 255)
  1255.             return $this;
  1256.         $this->providerPhone3 $providerPhone3;
  1257.         return $this;
  1258.     }
  1259.     public function getProviderFax(): ?string
  1260.     {
  1261.         return $this->providerFax;
  1262.     }
  1263.     public function setProviderFax(?string $providerFax): self
  1264.     {
  1265.         $this->providerFax $providerFax;
  1266.         return $this;
  1267.     }
  1268.     public function getProviderEmail(): ?string
  1269.     {
  1270.         return $this->providerEmail;
  1271.     }
  1272.     public function setProviderEmail(?string $providerEmail): self
  1273.     {
  1274.         $this->providerEmail $providerEmail;
  1275.         return $this;
  1276.     }
  1277.     public function getProviderEmail2(): ?string
  1278.     {
  1279.         return $this->providerEmail2;
  1280.     }
  1281.     public function setProviderEmail2(?string $providerEmail2): self
  1282.     {
  1283.         $this->providerEmail2 $providerEmail2;
  1284.         return $this;
  1285.     }
  1286.     public function getProviderUrl(): ?string
  1287.     {
  1288.         return $this->providerUrl;
  1289.     }
  1290.     public function setProviderUrl(?string $providerUrl): self
  1291.     {
  1292.         $this->providerUrl $providerUrl;
  1293.         return $this;
  1294.     }
  1295.     public function getProviderUrl2(): ?string
  1296.     {
  1297.         return $this->providerUrl2;
  1298.     }
  1299.     public function setProviderUrl2(?string $providerUrl2): self
  1300.     {
  1301.         $this->providerUrl2 $providerUrl2;
  1302.         return $this;
  1303.     }
  1304.     public function getProviderSpecialDistribution(): ?string
  1305.     {
  1306.         return $this->providerSpecialDistribution;
  1307.     }
  1308.     public function setProviderSpecialDistribution(?string $providerSpecialDistribution): self
  1309.     {
  1310.         $this->providerSpecialDistribution $providerSpecialDistribution;
  1311.         return $this;
  1312.     }
  1313.     public function getContactCivility(): ?string
  1314.     {
  1315.         return $this->contactCivility;
  1316.     }
  1317.     public function setContactCivility(?string $contactCivility): self
  1318.     {
  1319.         $this->contactCivility $contactCivility;
  1320.         return $this;
  1321.     }
  1322.     public function getContactLastname(): ?string
  1323.     {
  1324.         return $this->contactLastname;
  1325.     }
  1326.     public function setContactLastname(?string $contactLastname): self
  1327.     {
  1328.         $this->contactLastname $contactLastname;
  1329.         return $this;
  1330.     }
  1331.     public function getContactFirstName(): ?string
  1332.     {
  1333.         return $this->contactFirstName;
  1334.     }
  1335.     public function setContactFirstName(?string $contactFirstName): self
  1336.     {
  1337.         $this->contactFirstName $contactFirstName;
  1338.         return $this;
  1339.     }
  1340.     public function getManagerCivility(): ?string
  1341.     {
  1342.         return $this->managerCivility;
  1343.     }
  1344.     public function setManagerCivility(?string $managerCivility): self
  1345.     {
  1346.         $this->managerCivility $managerCivility;
  1347.         return $this;
  1348.     }
  1349.     public function getManagerLastname(): ?string
  1350.     {
  1351.         return $this->managerLastname;
  1352.     }
  1353.     public function setManagerLastname(?string $managerLastname): self
  1354.     {
  1355.         $this->managerLastname $managerLastname;
  1356.         return $this;
  1357.     }
  1358.     public function getManagerFirstName(): ?string
  1359.     {
  1360.         return $this->managerFirstName;
  1361.     }
  1362.     public function setManagerFirstName(?string $managerFirstName): self
  1363.     {
  1364.         $this->managerFirstName $managerFirstName;
  1365.         return $this;
  1366.     }
  1367.     public function getManagerStreetNumber(): ?string
  1368.     {
  1369.         return $this->managerStreetNumber;
  1370.     }
  1371.     public function setManagerStreetNumber(?string $managerStreetNumber): self
  1372.     {
  1373.         $this->managerStreetNumber $managerStreetNumber;
  1374.         return $this;
  1375.     }
  1376.     public function getManagerStreetName(): ?string
  1377.     {
  1378.         return $this->managerStreetName;
  1379.     }
  1380.     public function setManagerStreetName(?string $managerStreetName): self
  1381.     {
  1382.         $this->managerStreetName $managerStreetName;
  1383.         return $this;
  1384.     }
  1385.     public function getManagerAdditionAddress(): ?string
  1386.     {
  1387.         return $this->managerAdditionAddress;
  1388.     }
  1389.     public function setManagerAdditionAddress(?string $managerAdditionAddress): self
  1390.     {
  1391.         $this->managerAdditionAddress $managerAdditionAddress;
  1392.         return $this;
  1393.     }
  1394.     public function getManagerZipCode(): ?string
  1395.     {
  1396.         return $this->managerZipCode;
  1397.     }
  1398.     public function setManagerZipCode(?string $managerZipCode): self
  1399.     {
  1400.         $this->managerZipCode $managerZipCode;
  1401.         return $this;
  1402.     }
  1403.     public function getManagerCity(): ?string
  1404.     {
  1405.         return $this->managerCity;
  1406.     }
  1407.     public function setManagerCity(?string $managerCity): self
  1408.     {
  1409.         $this->managerCity $managerCity;
  1410.         return $this;
  1411.     }
  1412.     public function getManagerCountry(): ?string
  1413.     {
  1414.         return $this->managerCountry;
  1415.     }
  1416.     public function setManagerCountry(?string $managerCountry): self
  1417.     {
  1418.         $this->managerCountry $managerCountry;
  1419.         return $this;
  1420.     }
  1421.     public function getManagerPhone(): ?string
  1422.     {
  1423.         return $this->managerPhone;
  1424.     }
  1425.     public function setManagerPhone(?string $managerPhone): self
  1426.     {
  1427.         $this->managerPhone $managerPhone;
  1428.         return $this;
  1429.     }
  1430.     public function getManagerPhone2(): ?string
  1431.     {
  1432.         return $this->managerPhone2;
  1433.     }
  1434.     public function setManagerPhone2(?string $managerPhone2): self
  1435.     {
  1436.         $this->managerPhone2 $managerPhone2;
  1437.         return $this;
  1438.     }
  1439.     public function getManagerPhone3(): ?string
  1440.     {
  1441.         return $this->managerPhone3;
  1442.     }
  1443.     public function setManagerPhone3(?string $managerPhone3): self
  1444.     {
  1445.         $this->managerPhone3 $managerPhone3;
  1446.         return $this;
  1447.     }
  1448.     public function getManagerFax(): ?string
  1449.     {
  1450.         return $this->managerFax;
  1451.     }
  1452.     public function setManagerFax(?string $managerFax): self
  1453.     {
  1454.         $this->managerFax $managerFax;
  1455.         return $this;
  1456.     }
  1457.     public function getManagerEmail(): ?string
  1458.     {
  1459.         return $this->managerEmail;
  1460.     }
  1461.     public function setManagerEmail(?string $managerEmail): self
  1462.     {
  1463.         $this->managerEmail $managerEmail;
  1464.         return $this;
  1465.     }
  1466.     public function getManagerEmail2(): ?string
  1467.     {
  1468.         return $this->managerEmail2;
  1469.     }
  1470.     public function setManagerEmail2(?string $managerEmail2): self
  1471.     {
  1472.         $this->managerEmail2 $managerEmail2;
  1473.         return $this;
  1474.     }
  1475.     public function getManagerUrl(): ?string
  1476.     {
  1477.         return $this->managerUrl;
  1478.     }
  1479.     public function setManagerUrl(?string $managerUrl): self
  1480.     {
  1481.         $this->managerUrl $managerUrl;
  1482.         return $this;
  1483.     }
  1484.     public function getManagerUrl2(): ?string
  1485.     {
  1486.         return $this->managerUrl2;
  1487.     }
  1488.     public function setManagerUrl2(?string $managerUrl2): self
  1489.     {
  1490.         $this->managerUrl2 $managerUrl2;
  1491.         return $this;
  1492.     }
  1493.     public function getManagerSpecialDistribution(): ?string
  1494.     {
  1495.         return $this->managerSpecialDistribution;
  1496.     }
  1497.     public function setManagerSpecialDistribution(?string $managerSpecialDistribution): self
  1498.     {
  1499.         $this->managerSpecialDistribution $managerSpecialDistribution;
  1500.         return $this;
  1501.     }
  1502.     public function getComment1(): ?string
  1503.     {
  1504.         return $this->comment1;
  1505.     }
  1506.     public function setComment1(?string $comment1): self
  1507.     {
  1508.         $this->comment1 $comment1;
  1509.         return $this;
  1510.     }
  1511.     public function getComment2(): ?string
  1512.     {
  1513.         return $this->comment2;
  1514.     }
  1515.     public function setComment2(?string $comment2): self
  1516.     {
  1517.         $this->comment2 $comment2;
  1518.         return $this;
  1519.     }
  1520.     public function getComment7(): ?string
  1521.     {
  1522.         return $this->comment7;
  1523.     }
  1524.     public function setComment7(?string $comment7): self
  1525.     {
  1526.         $this->comment7 $comment7;
  1527.         return $this;
  1528.     }
  1529.     public function getComment8(): ?string
  1530.     {
  1531.         return $this->comment8;
  1532.     }
  1533.     public function setComment8(?string $comment8): self
  1534.     {
  1535.         $this->comment8 $comment8;
  1536.         return $this;
  1537.     }
  1538.     public function getComment9(): ?string
  1539.     {
  1540.         return $this->comment9;
  1541.     }
  1542.     public function setComment9(?string $comment9): self
  1543.     {
  1544.         $this->comment9 $comment9;
  1545.         return $this;
  1546.     }
  1547.     public function getCommentHtml(): ?string
  1548.     {
  1549.         return $this->commentHtml;
  1550.     }
  1551.     public function setCommentHtml(?string $commentHtml): self
  1552.     {
  1553.         $this->commentHtml $commentHtml;
  1554.         return $this;
  1555.     }
  1556.     public function getCommentHtml2(): ?string
  1557.     {
  1558.         return $this->commentHtml2;
  1559.     }
  1560.     public function setCommentHtml2(?string $commentHtml2): self
  1561.     {
  1562.         $this->commentHtml2 $commentHtml2;
  1563.         return $this;
  1564.     }
  1565.     public function getCommentHtml3(): ?string
  1566.     {
  1567.         return $this->commentHtml3;
  1568.     }
  1569.     public function setCommentHtml3(?string $commentHtml3): self
  1570.     {
  1571.         $this->commentHtml3 $commentHtml3;
  1572.         return $this;
  1573.     }
  1574.     public function getMemo1(): ?string
  1575.     {
  1576.         return $this->memo1;
  1577.     }
  1578.     public function setMemo1(?string $memo1): self
  1579.     {
  1580.         $this->memo1 $memo1;
  1581.         return $this;
  1582.     }
  1583.     public function getMemo2(): ?string
  1584.     {
  1585.         return $this->memo2;
  1586.     }
  1587.     public function setMemo2(?string $memo2): self
  1588.     {
  1589.         $this->memo2 $memo2;
  1590.         return $this;
  1591.     }
  1592.     public function getMemo3(): ?string
  1593.     {
  1594.         return $this->memo3;
  1595.     }
  1596.     public function setMemo3(?string $memo3): self
  1597.     {
  1598.         $this->memo3 $memo3;
  1599.         return $this;
  1600.     }
  1601.     public function getDocumentationf(): ?string
  1602.     {
  1603.         return $this->documentationf;
  1604.     }
  1605.     public function setDocumentationf(?string $documentationf): self
  1606.     {
  1607.         $this->documentationf $documentationf;
  1608.         return $this;
  1609.     }
  1610.     public function getDocumentationl1(): ?string
  1611.     {
  1612.         return $this->documentationl1;
  1613.     }
  1614.     public function setDocumentationl1(?string $documentationl1): self
  1615.     {
  1616.         $this->documentationl1 $documentationl1;
  1617.         return $this;
  1618.     }
  1619.     public function getDocumentationl2(): ?string
  1620.     {
  1621.         return $this->documentationl2;
  1622.     }
  1623.     public function setDocumentationl2(?string $documentationl2): self
  1624.     {
  1625.         $this->documentationl2 $documentationl2;
  1626.         return $this;
  1627.     }
  1628.     public function getKml(): ?string
  1629.     {
  1630.         return $this->kml;
  1631.     }
  1632.     public function setKml(?string $kml): self
  1633.     {
  1634.         $this->kml $kml;
  1635.         return $this;
  1636.     }
  1637.     public function getGeoPoint()
  1638.     {
  1639.         return $this->geoPoint;
  1640.     }
  1641.     public function setGeoPoint($geoPoint): self
  1642.     {
  1643.         $this->geoPoint $geoPoint;
  1644.         return $this;
  1645.     }
  1646.     public function getGeoLinestring()
  1647.     {
  1648.         return $this->geoLinestring;
  1649.     }
  1650.     public function setGeoLinestring($geoLinestring): self
  1651.     {
  1652.         $this->geoLinestring $geoLinestring;
  1653.         return $this;
  1654.     }
  1655.     public function getEntite(): ?int
  1656.     {
  1657.         return $this->entite;
  1658.     }
  1659.     public function setEntite(?int $entite): self
  1660.     {
  1661.         $this->entite $entite;
  1662.         return $this;
  1663.     }
  1664.     public function getMarking(): ?int
  1665.     {
  1666.         return $this->marking;
  1667.     }
  1668.     public function setMarking(?int $marking): self
  1669.     {
  1670.         $this->marking $marking;
  1671.         return $this;
  1672.     }
  1673.     public function getParams(): ?string
  1674.     {
  1675.         return $this->params;
  1676.     }
  1677.     public function setParams(?string $params): self
  1678.     {
  1679.         $this->params $params;
  1680.         return $this;
  1681.     }
  1682.     public function getIsValid(): ?bool
  1683.     {
  1684.         return $this->isValid;
  1685.     }
  1686.     public function setIsValid(?bool $isValid): self
  1687.     {
  1688.         $this->isValid $isValid;
  1689.         return $this;
  1690.     }
  1691.     public function getValidFrom(): ?\DateTimeInterface
  1692.     {
  1693.         return $this->validFrom;
  1694.     }
  1695.     public function setValidFrom(?\DateTimeInterface $validFrom): self
  1696.     {
  1697.         $this->validFrom $validFrom;
  1698.         return $this;
  1699.     }
  1700.     public function getValidTo(): ?\DateTimeInterface
  1701.     {
  1702.         return $this->validTo;
  1703.     }
  1704.     public function setValidTo(?\DateTimeInterface $validTo): self
  1705.     {
  1706.         $this->validTo $validTo;
  1707.         return $this;
  1708.     }
  1709.     public function getMaxUpdate(): ?\DateTimeInterface
  1710.     {
  1711.         return $this->maxUpdate;
  1712.     }
  1713.     public function setMaxUpdate(?\DateTimeInterface $maxUpdate): self
  1714.     {
  1715.         $this->maxUpdate $maxUpdate;
  1716.         return $this;
  1717.     }
  1718.     public function getCreatedAt(): ?\DateTimeInterface
  1719.     {
  1720.         return $this->createdAt;
  1721.     }
  1722.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  1723.     {
  1724.         $this->createdAt $createdAt;
  1725.         return $this;
  1726.     }
  1727.     public function getCreatedBy(): ?int
  1728.     {
  1729.         return $this->created_by;
  1730.     }
  1731.     public function setCreatedBy(?int $created_by): self
  1732.     {
  1733.         $this->created_by $created_by;
  1734.         return $this;
  1735.     }
  1736.     public function getUpdatedAt(): ?\DateTimeInterface
  1737.     {
  1738.         return $this->updatedAt;
  1739.     }
  1740.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  1741.     {
  1742.         $this->updatedAt $updatedAt;
  1743.         return $this;
  1744.     }
  1745.     public function getUpdatedBy(): ?int
  1746.     {
  1747.         return $this->updatedBy;
  1748.     }
  1749.     public function setUpdatedBy(?int $updatedBy): self
  1750.     {
  1751.         $this->updatedBy $updatedBy;
  1752.         return $this;
  1753.     }
  1754.     public function getAlea(): ?int
  1755.     {
  1756.         return $this->alea;
  1757.     }
  1758.     public function setAlea(?int $alea): self
  1759.     {
  1760.         $this->alea $alea;
  1761.         return $this;
  1762.     }
  1763.     public function getDocument(): ?string
  1764.     {
  1765.         return $this->document;
  1766.     }
  1767.     public function setDocument(?string $document): self
  1768.     {
  1769.         $this->document $document;
  1770.         return $this;
  1771.     }
  1772.     public function getId(): ?int
  1773.     {
  1774.         return $this->id;
  1775.     }
  1776.     /**
  1777.      * @return Collection|DnsitProductCriterion[]
  1778.      */
  1779.     public function getProductCriterions(): Collection
  1780.     {
  1781.         return $this->productCriterions;
  1782.     }
  1783.     public function addProductCriterion(DnsitProductCriterion $productCriterion): self
  1784.     {
  1785.         if (!$this->productCriterions->contains($productCriterion)) {
  1786.             $this->productCriterions[] = $productCriterion;
  1787.             $productCriterion->setProduct($this);
  1788.         }
  1789.         return $this;
  1790.     }
  1791.     public function removeProductCriterion(DnsitProductCriterion $productCriterion): self
  1792.     {
  1793.         if ($this->productCriterions->contains($productCriterion)) {
  1794.             $this->productCriterions->removeElement($productCriterion);
  1795.             // set the owning side to null (unless already changed)
  1796.             if ($productCriterion->getProduct() === $this) {
  1797.                 $productCriterion->setProduct(null);
  1798.             }
  1799.         }
  1800.         return $this;
  1801.     }
  1802.     /**
  1803.      * @return Collection|CacheTemp[]
  1804.      */
  1805.     public function getCacheTemps(): Collection
  1806.     {
  1807.         return $this->cacheTemps;
  1808.     }
  1809.     public function addCacheTemp(CacheTemp $cacheTemp): self
  1810.     {
  1811.         if (!$this->cacheTemps->contains($cacheTemp)) {
  1812.             $this->cacheTemps[] = $cacheTemp;
  1813.             $cacheTemp->setProduct($this);
  1814.         }
  1815.         return $this;
  1816.     }
  1817.     public function removeCacheTemp(CacheTemp $cacheTemp): self
  1818.     {
  1819.         if ($this->cacheTemps->contains($cacheTemp)) {
  1820.             $this->cacheTemps->removeElement($cacheTemp);
  1821.             // set the owning side to null (unless already changed)
  1822.             if ($cacheTemp->getProduct() === $this) {
  1823.                 $cacheTemp->setProduct(null);
  1824.             }
  1825.         }
  1826.         return $this;
  1827.     }
  1828.     /**
  1829.      * @return Collection|DnsitHour[]
  1830.      */
  1831.     public function getHours(): Collection
  1832.     {
  1833.         return $this->hours;
  1834.     }
  1835.     public function addHour(DnsitHour $hour): self
  1836.     {
  1837.         if (!$this->hours->contains($hour)) {
  1838.             $this->hours[] = $hour;
  1839.             $hour->setProduct($this);
  1840.         }
  1841.         return $this;
  1842.     }
  1843.     public function removeHour(DnsitHour $hour): self
  1844.     {
  1845.         if ($this->hours->contains($hour)) {
  1846.             $this->hours->removeElement($hour);
  1847.             // set the owning side to null (unless already changed)
  1848.             if ($hour->getProduct() === $this) {
  1849.                 $hour->setProduct(null);
  1850.             }
  1851.         }
  1852.         return $this;
  1853.     }
  1854.     /**
  1855.      * @return Collection|DnsitShortHour[]
  1856.      */
  1857.     public function getShortHours(): Collection
  1858.     {
  1859.         return $this->shortHours;
  1860.     }
  1861.     public function addShortHour(DnsitShortHour $shortHour): self
  1862.     {
  1863.         if (!$this->shortHours->contains($shortHour)) {
  1864.             $this->shortHours[] = $shortHour;
  1865.             $shortHour->setProduct($this);
  1866.         }
  1867.         return $this;
  1868.     }
  1869.     public function removeShortHour(DnsitShortHour $shortHour): self
  1870.     {
  1871.         if ($this->shortHours->contains($shortHour)) {
  1872.             $this->shortHours->removeElement($shortHour);
  1873.             // set the owning side to null (unless already changed)
  1874.             if ($shortHour->getProduct() === $this) {
  1875.                 $shortHour->setProduct(null);
  1876.             }
  1877.         }
  1878.         return $this;
  1879.     }
  1880.     /**
  1881.      * @return Collection|DnsitCoupledProduct[]
  1882.      */
  1883.     public function getCoupledProducts(): Collection
  1884.     {
  1885.         return $this->coupledProducts;
  1886.     }
  1887.     public function addCoupledProduct(DnsitCoupledProduct $coupledProduct): self
  1888.     {
  1889.         if (!$this->coupledProducts->contains($coupledProduct)) {
  1890.             $this->coupledProducts[] = $coupledProduct;
  1891.             $coupledProduct->setProduct($this);
  1892.         }
  1893.         return $this;
  1894.     }
  1895.     public function removeCoupledProduct(DnsitCoupledProduct $coupledProduct): self
  1896.     {
  1897.         if ($this->coupledProducts->contains($coupledProduct)) {
  1898.             $this->coupledProducts->removeElement($coupledProduct);
  1899.             // set the owning side to null (unless already changed)
  1900.             if ($coupledProduct->getProduct() === $this) {
  1901.                 $coupledProduct->setProduct(null);
  1902.             }
  1903.         }
  1904.         return $this;
  1905.     }
  1906.     /**
  1907.      * @return Collection|DnsitCoupledProduct[]
  1908.      */
  1909.     public function getCoupledCoupledProducts(): Collection
  1910.     {
  1911.         return $this->coupledCoupledProducts;
  1912.     }
  1913.     public function addCoupledCoupledProduct(DnsitCoupledProduct $coupledCoupledProduct): self
  1914.     {
  1915.         if (!$this->coupledCoupledProducts->contains($coupledCoupledProduct)) {
  1916.             $this->coupledCoupledProducts[] = $coupledCoupledProduct;
  1917.             $coupledCoupledProduct->setCoupledProduct($this);
  1918.         }
  1919.         return $this;
  1920.     }
  1921.     public function removeCoupledCoupledProduct(DnsitCoupledProduct $coupledCoupledProduct): self
  1922.     {
  1923.         if ($this->coupledCoupledProducts->contains($coupledCoupledProduct)) {
  1924.             $this->coupledCoupledProducts->removeElement($coupledCoupledProduct);
  1925.             // set the owning side to null (unless already changed)
  1926.             if ($coupledCoupledProduct->getCoupledProduct() === $this) {
  1927.                 $coupledCoupledProduct->setCoupledProduct(null);
  1928.             }
  1929.         }
  1930.         return $this;
  1931.     }
  1932.     public function getType(): ?DnsitType
  1933.     {
  1934.         return $this->type;
  1935.     }
  1936.     public function setType(?DnsitType $type): self
  1937.     {
  1938.         $this->type $type;
  1939.         return $this;
  1940.     }
  1941.     public function getCityInsee(): ?CityInsee
  1942.     {
  1943.         return $this->cityInsee;
  1944.     }
  1945.     public function setCityInsee(?CityInsee $cityInsee): self
  1946.     {
  1947.         $this->cityInsee $cityInsee;
  1948.         return $this;
  1949.     }
  1950.     public function getProductEntity(): ?DnsitEntity
  1951.     {
  1952.         return $this->productEntity;
  1953.     }
  1954.     public function setProductEntity(?DnsitEntity $ent): self
  1955.     {
  1956.         $this->productEntity $ent;
  1957.         return $this;
  1958.     }
  1959.     public function getTranslate(): ?DnsitTranslateProduct
  1960.     {
  1961.         return $this->translate;
  1962.     }
  1963.     public function setTranslate(?DnsitTranslateProduct $translate): self
  1964.     {
  1965.         $this->translate $translate;
  1966.         return $this;
  1967.     }
  1968.     /**
  1969.      * @return Collection|DnsitProductCategory[]
  1970.      */
  1971.     public function getCategory(): Collection
  1972.     {
  1973.         return $this->category;
  1974.     }
  1975.     public function addCategory(DnsitProductCategory $category): self
  1976.     {
  1977.         if (!$this->category->contains($category)) {
  1978.             $this->category[] = $category;
  1979.         }
  1980.         return $this;
  1981.     }
  1982.     public function removeCategory(DnsitProductCategory $category): self
  1983.     {
  1984.         if ($this->category->contains($category)) {
  1985.             $this->category->removeElement($category);
  1986.         }
  1987.         return $this;
  1988.     }
  1989.     public function bindLeiDatas($fiche)
  1990.     {
  1991.         if ((integer)$fiche->PRODUIT) {
  1992.             $this->setProductCode((integer)$fiche->PRODUIT);
  1993.         }
  1994.         $longitude str_replace(",""."$fiche->LONGITUDE);
  1995.         $latitude str_replace(",""."$fiche->LATITUDE);
  1996.         if (abs((float)$longitude) >= && abs((float)$longitude) <= 180 && abs((float)$latitude) >= && abs((float)$latitude) < 90) {
  1997.             $this->setLongitude((double)$longitude);
  1998.             $this->setLatitude((double)$latitude);
  1999.             // Patch 08/08/19 : ajout du cast string
  2000.             // Patch JM 03/02/2022 : les points sont en LON LAT et non pas LAT LON
  2001.             // $point = new \LongitudeOne\Spatial\PHP\Types\Geometry\Point($this->getLongitude(), $this->getLatitude());
  2002.             // $point->setSrid("4326");
  2003.             // $this->setGeoPoint($point);
  2004.             $this->setGeoPoint('SRID=4326;POINT(' $this->getLongitude() . ' ' $this->getLatitude() . ')');
  2005.         }
  2006.         $this->setName((string)$fiche->NOM);
  2007.         $this->setAddress((string)$fiche->ADRESSE);
  2008.         $this->setStreetNumber((string)$fiche->ADRPROD_NUM_VOIE);
  2009.         $this->setStreetName((string)$fiche->ADRPROD_LIB_VOIE);
  2010.         $this->setAdditionAddress((string)$fiche->ADRPROD_COMPL_ADRESSE);
  2011.         $this->setSpecialDistributionAddress((string)$fiche->ADRPROD_DISTRI_SPE);
  2012.         $this->setZipCode((string)$fiche->ADRPROD_CP);
  2013.         $this->setInsee((string)$fiche->INSEE);
  2014.         $this->setCity((string)$fiche->ADRPROD_LIBELLE_COMMUNE);
  2015.         $this->setCountry((string)$fiche->ADRPROD_PAYS);
  2016.         if ((integer)$fiche->GEOREF) {
  2017.             $this->setGeoref((integer)$fiche->GEOREF);
  2018.         }
  2019.         if ((integer)$fiche->GEOREFTYPE) {
  2020.             $this->setGeorefType((integer)$fiche->GEOREFTYPE);
  2021.         }
  2022.         $this->setEmail((string)$fiche->ADRPROD_EMAIL);
  2023.         $this->setEmail2((string)$fiche->ADRPROD_EMAIL2);
  2024.         $this->setPhone((string)$fiche->ADRPROD_TEL);
  2025.         $this->setPhone2((string)$fiche->ADRPROD_TEL2);
  2026.         $this->setPhone3((string)$fiche->ADRPROD_TEL3);
  2027.         $this->setUrl((string)$fiche->ADRPROD_URL);
  2028.         $this->setUrl2((string)$fiche->ADRPROD_URL2);
  2029.         $this->setComment((string)$fiche->COMMENTAIRE);
  2030.         $this->setComment1((string)$fiche->COMMENTAIREL1);
  2031.         $this->setComment2((string)$fiche->COMMENTAIREL2);
  2032.         $this->setComment7((string)$fiche->COMMENTAIRE7);
  2033.         $this->setComment8((string)$fiche->COMMENTAIRE8);
  2034.         $this->setComment9((string)$fiche->COMMENTAIRE9);
  2035.         $this->setCommentHtml((string)$fiche->COMMENTAIREHTML);
  2036.         $this->setCommentHtml2((string)$fiche->COMMENTAIREHTML2);
  2037.         $this->setCommentHtml3((string)$fiche->COMMENTAIREHTML3);
  2038.         $this->setInternalComment((string)$fiche->COMMENTAIREINTERNE);
  2039.         $this->setMemo1((string)$fiche->MEMO1);
  2040.         $this->setMemo2((string)$fiche->MEMO2);
  2041.         $this->setMemo3((string)$fiche->MEMO3);
  2042.         $this->setProviderCivility((string)$fiche->PREST_CIVILITE);
  2043.         $this->setProviderResponsibleFirstname((string)$fiche->PREST_PRENOM_RESP);
  2044.         $this->setProviderResponsibleName((string)$fiche->PREST_NOM_RESP);
  2045.         $this->setProviderName((string)$fiche->PREST_NOM);
  2046.         $this->setProviderStreetNumber((string)$fiche->ADRPREST_NUM_VOIE);
  2047.         $this->setProviderStreetName((string)$fiche->ADRPREST_LIB_VOIE);
  2048.         $this->setProviderAdditionAddress((string)$fiche->ADRPREST_COMPL_ADRESSE);
  2049.         $this->setProviderZipCode((string)$fiche->ADRPREST_CP);
  2050.         $this->setProviderCity((string)$fiche->ADRPREST_LIBELLE_COMMUNE);
  2051.         $this->setProviderCountry((string)$fiche->ADRPREST_PAYS);
  2052.         $this->setProviderPhone((string)$fiche->ADRPREST_TEL);
  2053.         $this->setProviderPhone2((string)$fiche->ADRPREST_TEL2);
  2054.         $this->setProviderPhone3((string)$fiche->ADRPREST_TEL3);
  2055.         $this->setProviderEmail((string)$fiche->ADRPREST_EMAIL);
  2056.         $this->setProviderEmail2((string)$fiche->ADRPREST_EMAIL2);
  2057.         $this->setProviderUrl((string)$fiche->ADRPREST_URL);
  2058.         $this->setProviderUrl2((string)$fiche->ADRPREST_URL2);
  2059.         $this->setContactCivility((string)$fiche->CIVILITE_RESPONSABLE);
  2060.         $this->setContactFirstName((string)$fiche->PRENOM_RESPONSABLE);
  2061.         $this->setContactLastName((string)$fiche->NOM_RESPONSABLE);
  2062.         $this->setManagerCivility((string)$fiche->CIVILITE_PERSONNE_EN_CHARGE);
  2063.         $this->setManagerLastName((string)$fiche->NOM_PERSONNE_EN_CHARGE);
  2064.         $this->setManagerFirstName((string)$fiche->PRENOM_PERSONNE_EN_CHARGE);
  2065.         $this->setManagerStreetNumber((string)$fiche->ADRPEC_NUM_VOIE);
  2066.         $this->setManagerStreetName((string)$fiche->ADRPEC_LIB_VOIE);
  2067.         $this->setManagerAdditionAddress((string)$fiche->ADRPEC_COMPL_ADRESSE);
  2068.         $this->setManagerSpecialDistribution((string)$fiche->ADRPEC_DISTRI_SPE);
  2069.         $this->setManagerZipCode((string)$fiche->ADRPEC_CP);
  2070.         $this->setManagerCity((string)$fiche->ADRPEC_LIBELLE_COMMUNE);
  2071.         $this->setManagerCountry((string)$fiche->ADRPEC_PAYS);
  2072.         $this->setManagerPhone((string)$fiche->ADRPEC_TEL);
  2073.         $this->setManagerPhone2((string)$fiche->ADRPEC_TEL2);
  2074.         $this->setManagerPhone3((string)$fiche->ADRPEC_TEL3);
  2075.         $this->setManagerFax((string)$fiche->ADRPEC_FAX);
  2076.         $this->setManagerEmail((string)$fiche->ADRPEC_EMAIL);
  2077.         $this->setManagerEmail2((string)$fiche->ADRPEC_EMAIL2);
  2078.         $this->setManagerUrl((string)$fiche->ADRPEC_URL);
  2079.         $this->setManagerUrl2((string)$fiche->ADRPEC_URL2);
  2080.         $this->setDocumentationf((string)$fiche->DOCUMENTATIONF);
  2081.         $this->setDocumentationl1((string)$fiche->DOCUMENTATIONL1);
  2082.         $this->setDocumentationl2((string)$fiche->DOCUMENTATIONL2);
  2083.         $this->setTypeName((string)$fiche->TYPE_NOM);
  2084.         if ((integer)$fiche->ENTITE_GESTIONNAIRE) {
  2085.             $this->setEntityManager((integer)$fiche->ENTITE_GESTIONNAIRE);
  2086.         }
  2087.         if ((integer)$fiche->MARQUAGE) {
  2088.             $this->setMarking((integer)$fiche->MARQUAGE);
  2089.         }
  2090.         if ((integer)$fiche->PRESTATAIRE) {
  2091.             $this->setProviderCode((integer)$fiche->PRESTATAIRE);
  2092.         }
  2093.         if ((integer)$fiche->TYPE_DE_PRODUIT) {
  2094.             $this->setProductTypeCode((integer)$fiche->TYPE_DE_PRODUIT);
  2095.         }
  2096.         $tmp = (string)$fiche->DATMAJ;
  2097.         $tmp date_create_from_format("d/m/Y H:i:s"$tmp);
  2098.         if ($tmp !== false) {
  2099.             $this->setUpdatedAt($tmp);
  2100.         }
  2101.         $tmp = (string)$fiche->DATECREATION;
  2102.         $tmp date_create_from_format("d/m/Y H:i:s"$tmp);
  2103.         if ($tmp !== false)
  2104.             $this->setCreatedAt($tmp);
  2105.         $tmp = (string)$fiche->VALABLE_DEPUIS;
  2106.         $tmp date_create_from_format("d/m/Y H:i:s"$tmp);
  2107.         if ($tmp !== false)
  2108.             $this->setValidFrom($tmp);
  2109.         $tmp = (string)$fiche->VALABLE_JUSQU_A;
  2110.         $tmp date_create_from_format("d/m/Y H:i:s"$tmp);
  2111.         if ($tmp !== false)
  2112.             $this->setValidTo($tmp);
  2113.         $tmp = (string)$fiche->MAXMAJ;
  2114.         $tmp date_create_from_format("d/m/Y H:i:s"$tmp);
  2115.         if ($tmp !== false)
  2116.             $this->setMaxUpdate($tmp);
  2117.         // $this->setUpdatedAt((string) $fiche->DATMAJ);
  2118.         //$this->setCreatedAt((string) $fiche->DATECREATION);
  2119.         //$this->setValidFrom((string) $fiche->VALABLE_DEPUIS);
  2120.         // $this->setValidTo((string) $fiche->VALABLE_JUSQU_A);
  2121.         // $this->setMaxUpdate((string) $fiche->MAXMAJ);
  2122.         if ((integer)$fiche->LALEA)
  2123.             $this->setAlea((integer)$fiche->LALEA);
  2124.         // Ici on intègre le KML
  2125.         // $mods = BridgeFrontUtils::filterProductModalities($fiche->modalities,900002);
  2126.         $testKML $fiche->xpath('CRITERES/Crit[@CLEF_CRITERE=900002]');
  2127.         if (!empty($testKML) && is_array($testKML) && !empty((string)$testKML[0])) {
  2128.             $this->setKml((string)$testKML[0]);
  2129.             // on récupère le contenu de l'URL stockée dans $KML
  2130.             $urlKml $this->kml;
  2131.             // on prévoit plusieurs essais de connexion au cas où
  2132.             $nberr 0;
  2133.             $done false;
  2134.             $kmlData false;
  2135.             $ctx stream_context_create(array('http'=>
  2136.                 array(
  2137.                     'timeout' => 5,  // 5 secondes
  2138.                 )
  2139.             ));
  2140.             while (!$done && $nberr 3) {
  2141.                 try {
  2142.                     $kmlData = @file_get_contents($urlKmlfalse$ctx);
  2143.                     if ($kmlData !== false)
  2144.                         $done true;
  2145.                     else
  2146.                         $nberr++;
  2147.                 } catch (\Exception $e) {
  2148.                     $nberr++;
  2149.                 }
  2150.                 if (!$done)
  2151.                     sleep($nberr);
  2152.             }
  2153.             if ($kmlData !== false) {
  2154.                 // on charge le KML dans une géométrie
  2155.                 $lineStringKML \geoPHP::load($kmlData'kml');
  2156.                 // on s'assure qu'il s'agisse d'un élément simple
  2157.                 $simpleLineStringKML \geoPHP::geometryReduce($lineStringKML);
  2158.                 $lineStringArray = array();
  2159.                 if ($simpleLineStringKML !== false is_object($simpleLineStringKML)) {
  2160.                     // On s'attend à avoir une LineString mais il ya des fois des anomalies, on vérifie donc le type
  2161.                     $dataType get_class($simpleLineStringKML);
  2162.                     // Doctrine Spatial a besoin d'un tableau de points en 2D seulement et les KML peuvent être en 3D
  2163.                     // Il faut aussi des types \LongitudeOne\Spatial\PHP\Types\Geometry\Point et non des types geoPHP\Point
  2164.                     // on récupère donc un tableau des composants de la géométrie
  2165.                     $lineStringKMLPoints $simpleLineStringKML->getComponents();
  2166.                     if (is_array($lineStringKMLPoints) && count($lineStringKMLPoints) > 0) {
  2167.                         // si la géométrie est bien une LineString...
  2168.                         if ($dataType == 'LineString') {
  2169.                             foreach ($lineStringKMLPoints as $geoPhpPoint) {
  2170.                                 if (is_array($geoPhpPoint->coords) && count($geoPhpPoint->coords) >= 2) {
  2171.                                     // on boucle sur ses points
  2172.                                     // $creofPoint = new \LongitudeOne\Spatial\PHP\Types\Geometry\Point($geoPhpPoint->coords[0], $geoPhpPoint->coords[1]);
  2173.                                     // $creofPoint->setSrid("4326");
  2174.                                     // $lineStringArray[] = $creofPoint;
  2175.                                     $lineStringArray[] = $geoPhpPoint->coords[0] . ' ' $geoPhpPoint->coords[1] ;
  2176.                                 }
  2177.                             }
  2178.                         } else {
  2179.                             // Si la géométrie n'est pas une lineString, on considère que c'est soit une multilinestring (99% des cas) soit une multigeometry, on doit alors faire une deuxième boucle sur les objets
  2180.                             foreach ($lineStringKMLPoints as $lineString) {
  2181.                                 $lineStringPoints $lineString->getComponents();
  2182.                                 if (is_array($lineStringPoints) && count($lineStringPoints) > 0) {
  2183.                                     foreach ($lineStringPoints as $geoPhpPoint) {
  2184.                                         if (is_array($geoPhpPoint->coords) && count($geoPhpPoint->coords) >= 2) {
  2185.                                             // $creofPoint = new \LongitudeOne\Spatial\PHP\Types\Geometry\Point($geoPhpPoint->coords[0], $geoPhpPoint->coords[1]);
  2186.                                             // $creofPoint->setSrid("4326");
  2187.                                             // $lineStringArray[] = $creofPoint;
  2188.                                             $lineStringArray[] = $geoPhpPoint->coords[0] . ' ' $geoPhpPoint->coords[1] ;
  2189.                                         }
  2190.                                     }
  2191.                                 }
  2192.                             }
  2193.                         }
  2194.                     }
  2195.                 }
  2196.                 if (!empty($lineStringArray)) {
  2197.                     // avec ce tableau de points, on crée un LineString PHP
  2198.                     // $lineString = new \LongitudeOne\Spatial\PHP\Types\Geometry\LineString($lineStringArray, "4326");
  2199.                     $lineString 'SRID=4326;LINESTRING(' implode(','$lineStringArray) . ')';
  2200.                     // on le passe dans geoLineString
  2201.                     $this->setGeoLineString($lineString);
  2202.                 }
  2203.             } else {
  2204.                 $this->setKml(null);
  2205.             }
  2206.         }
  2207.         $this->setMarking(MarkingCodesMask::LEI);
  2208.     }
  2209.     public function getLatitude(): ?float
  2210.     {
  2211.         return $this->latitude;
  2212.     }
  2213.     public function setLatitude(?float $latitude): self
  2214.     {
  2215.         $this->latitude $latitude;
  2216.         return $this;
  2217.     }
  2218.     public function getLongitude(): ?float
  2219.     {
  2220.         return $this->longitude;
  2221.     }
  2222.     public function setLongitude(?float $longitude): self
  2223.     {
  2224.         $this->longitude $longitude;
  2225.         return $this;
  2226.     }
  2227.     public function bindTourinsoftDatas($fiche$inutile='')
  2228.     {
  2229.         $tableau_balises_latitude = array("GmapLatitude""LAT","DetailGOOGLEMAPLATITUDE""LATITUDE");
  2230.         $tableau_balises_longitude = array("GmapLongitude""LON","DetailGOOGLEMAPLONGITUDE""LONGITUDE");
  2231.         $tableau_balises_traces = array("Itinerairegooglemap""DetailTRACEGPS""DetailTRACEGPS");
  2232.         // améliorer le code ainsi quand on en aura le courage
  2233.         $tableau_balises_nom = array("DetailNomoffre""DetailNOMOFFRE""DetailNOMMANIFESTATION""Nomoffre""Nomdeloffre""SyndicObjectName");
  2234.         $tableau_balises_ville = array("DetailCommune""DetailCOMMUNE""Commune""COMMUNE""COMMUNEPRINCIPALE""COMMUNEDEPART""Ville""COMMUNETOURISTIQUE");
  2235.         if (property_exists($fiche'DetailCommune') && !is_object($fiche->DetailCommune))
  2236.             $this->setCity((string)$fiche->DetailCommune);
  2237.         elseif (property_exists($fiche'DetailCOMMUNE') && !is_object($fiche->DetailCOMMUNE))
  2238.             $this->setCity((string)$fiche->DetailCOMMUNE);
  2239.         elseif (property_exists($fiche'Commune') && !is_object($fiche->Commune))
  2240.             $this->setCity((string)$fiche->Commune);
  2241.         elseif (property_exists($fiche'commune') && !is_object($fiche->commune))
  2242.             $this->setCity((string)$fiche->commune);
  2243.         elseif (property_exists($fiche'COMMUNE') && !is_object($fiche->COMMUNE))
  2244.             $this->setCity((string)$fiche->COMMUNE);
  2245.         elseif (property_exists($fiche'COMMUNEPRINCIPALE') && !is_object($fiche->COMMUNEPRINCIPALE))
  2246.             $this->setCity((string)$fiche->COMMUNEPRINCIPALE);
  2247.         elseif (property_exists($fiche'Ville') && !is_object($fiche->Ville))
  2248.             $this->setCity((string)$fiche->Ville);
  2249.         elseif (property_exists($fiche'COMMUNEDEPART') && !is_object($fiche->COMMUNEDEPART))
  2250.             $this->setCity((string)$fiche->COMMUNEDEPART);
  2251.         // Andernos
  2252.         elseif (property_exists($fiche'ADRESSEs') && is_array($fiche->ADRESSEs) && count($fiche->ADRESSEs) > && is_object($fiche->ADRESSEs[0]) && isset($fiche->ADRESSEs[0]->Communetouristique) && is_object($fiche->ADRESSEs[0]->Communetouristique) && property_exists($fiche->ADRESSEs[0]->Communetouristique'ThesLibelle'))
  2253.             $this->setCity((string)$fiche->ADRESSEs[0]->Communetouristique->ThesLibelle);
  2254.         // http://wcf.tourinsoft.com/Syndication/cdt37/339e9b43-b094-4871-867a-18d8dbdb7b20/Objects('ACCCEN0370007P')?$format=json
  2255.         $this->setProductTextKey($fiche->SyndicObjectID);
  2256.         $this->setMarking(0);
  2257.         $longitude 91;
  2258.         $latitude 181;
  2259.         foreach($tableau_balises_latitude as $balise) {
  2260.             if (property_exists($fiche$balise) && isset($fiche->$balise)) {
  2261.                 $latitude str_replace(",""."$fiche->$balise);
  2262.             }
  2263.         }
  2264.         foreach($tableau_balises_longitude as $balise) {
  2265.             if (property_exists($fiche$balise) && isset($fiche->$balise)) {
  2266.                 $longitude str_replace(",""."$fiche->$balise);
  2267.             }
  2268.         }
  2269.         if (abs((float)$longitude) >= && abs((float)$longitude) <= 180 && abs((float)$latitude) >= && abs((float)$latitude) < 90) {
  2270.             $this->setLongitude((float)$longitude);
  2271.             $this->setLatitude((float)$latitude);
  2272.             // Patch 08/08/19 : ajout du cast string
  2273.             // $point = new \LongitudeOne\Spatial\PHP\Types\Geometry\Point($this->getLongitude(), $this->getLatitude());
  2274.             // $point->setSrid("4326");
  2275.             // $this->setGeoPoint($point);
  2276.             $this->setGeoPoint('SRID=4326;POINT(' $this->getLongitude() . ' ' $this->getLatitude() . ')');
  2277.         }
  2278.         // Nouveau 06.11.2023 : traces GPS
  2279.         $dataTrace null;
  2280.         foreach($tableau_balises_traces as $balise) {
  2281.             if(isset($fiche->$balise))
  2282.                 $data json_decode($fiche->$balise);
  2283.             if(isset($data)) break;
  2284.         }
  2285.         if (isset($data) && is_object($data) && isset($data->lignes) &&  is_array($data->lignes)) {
  2286.             // On va recoller les lignes
  2287.             $lignesCollees = array();
  2288.             foreach($data->lignes as $ligne) {
  2289.                 if(!is_object($ligne) || !isset($ligne->path))
  2290.                     continue;
  2291.                 $lignesCollees array_merge($lignesCollees$ligne->path);
  2292.             }
  2293.             $tableauWKT = array();
  2294.             if(!empty($lignesCollees)) {
  2295.                 foreach($lignesCollees as $point) {
  2296.                     if(!is_array($point) || count($point) < 2) {
  2297.                         // Il y a parfois des points vides !!!
  2298.                         continue;
  2299.                     }
  2300.                     $tableauWKT[] = $point[1] . ' ' $point[0]; // Lng lat
  2301.                 }
  2302.             }
  2303.             if(!empty($tableauWKT)) {
  2304.                 $lineString 'SRID=4326;LINESTRING(' implode(','$tableauWKT) . ')';
  2305.                 $this->setGeoLinestring($lineString) ;
  2306.             } /* else {
  2307.                 $this->setKml(null);
  2308.             } */
  2309.         }
  2310.         // Fin traces GPS
  2311.         // Nom de la fiche
  2312.         foreach($tableau_balises_nom as $prop) {
  2313.             if (property_exists($fiche$prop) && !is_object($fiche->$prop))
  2314.                 $this->setName((string)$fiche->$prop);
  2315.             elseif (property_exists($fiche$prop) && is_object($fiche->$prop) && isset($fiche->$prop->ThesLibelle))
  2316.                 $this->setName((string)$fiche->$prop->ThesLibelle);
  2317.         }
  2318.         // $this->setAddress((string) $fiche->ADRESSE);
  2319.         // $this->setStreetNumber((string) $fiche->ADRPROD_NUM_VOIE);
  2320.         if (property_exists($fiche'AdresseComplete') && isset($fiche->AdresseComplete) && $fiche->AdresseComplete != '') {
  2321.             $tabadr explode('|', (string)$fiche->AdresseComplete);
  2322.             if (count($tabadr) >= 6) {
  2323.                 $this->setStreetName($tabadr[0]);
  2324.                 $this->setAdditionAddress($tabadr[1]);
  2325.                 $this->setZipCode($tabadr[4]);
  2326.                 $this->setCity($tabadr[5]);
  2327.             }
  2328.         }
  2329.         if (property_exists($fiche'DetailAdresse1') && !is_object($fiche->DetailAdresse1))
  2330.             $this->setStreetName((string)$fiche->DetailAdresse1);
  2331.         elseif (property_exists($fiche'DetailADRESSE1') && !is_object($fiche->DetailADRESSE1))
  2332.             $this->setStreetName((string)$fiche->DetailADRESSE1);
  2333.         elseif (property_exists($fiche'Adresse1') && !is_object($fiche->Adresse1))
  2334.             $this->setStreetName((string)$fiche->Adresse1);
  2335.         elseif (property_exists($fiche'AD1') && !is_object($fiche->AD1))
  2336.             $this->setStreetName((string)$fiche->AD1);
  2337.         elseif (property_exists($fiche'ADRESSE1') && !is_object($fiche->ADRESSE1))
  2338.             $this->setStreetName((string)$fiche->ADRESSE1);
  2339.         if (property_exists($fiche'DetailAdresse2') && !is_object($fiche->DetailAdresse2))
  2340.             $this->setAdditionAddress((string)$fiche->DetailAdresse2);
  2341.         elseif (property_exists($fiche'DetailADRESSE2') && !is_object($fiche->DetailADRESSE2))
  2342.             $this->setAdditionAddress((string)$fiche->DetailADRESSE2);
  2343.         elseif (property_exists($fiche'Adresse2') && !is_object($fiche->Adresse2))
  2344.             $this->setAdditionAddress((string)$fiche->Adresse2);
  2345.         elseif (property_exists($fiche'AD2') && !is_object($fiche->AD2))
  2346.             $this->setAdditionAddress((string)$fiche->AD2);
  2347.         elseif (property_exists($fiche'ADRESSE2') && !is_object($fiche->ADRESSE2))
  2348.             $this->setAdditionAddress((string)$fiche->ADRESSE2);
  2349.         if (property_exists($fiche'DetailADRESSE3'))
  2350.             $this->setSpecialDistributionAddress((string)$fiche->DetailADRESSE3);
  2351.         if (property_exists($fiche'AD3'))
  2352.             $this->setSpecialDistributionAddress((string)$fiche->AD3);
  2353.         elseif (property_exists($fiche'ADRESSE3'))
  2354.             $this->setSpecialDistributionAddress((string)$fiche->ADRESSE3);
  2355.         if (property_exists($fiche'DetailCodePostal') && !is_object($fiche->DetailCodePostal))
  2356.             $this->setZipCode((string)$fiche->DetailCodePostal);
  2357.         elseif (property_exists($fiche'DetailCODEPOSTAL') && !is_object($fiche->DetailCODEPOSTAL))
  2358.             $this->setZipCode((string)$fiche->DetailCODEPOSTAL);
  2359.         elseif (property_exists($fiche'CodePostal') && !is_object($fiche->CodePostal))
  2360.             $this->setZipCode((string)$fiche->CodePostal);
  2361.         elseif (property_exists($fiche'CP') && !is_object($fiche->CP))
  2362.             $this->setZipCode((string)$fiche->CP);
  2363.         elseif (property_exists($fiche'CODEPOSTAL') && !is_object($fiche->CODEPOSTAL))
  2364.             $this->setZipCode((string)$fiche->CODEPOSTAL);
  2365.         // ND patch 15.02.24 : ajout du break pour traiter le tableau dans l'ordre et s'arrêter
  2366.         foreach($tableau_balises_ville as $prop) {
  2367.             if (property_exists($fiche$prop) && !is_object($fiche->$prop)) {
  2368.                 $this->setCity((string)$fiche->$prop);
  2369.                 break;
  2370.             } elseif (property_exists($fiche$prop) && is_object($fiche->$prop) && isset($fiche->$prop->ThesLibelle)) {
  2371.                 $this->setCity((string)$fiche->$prop->ThesLibelle);
  2372.                 break;
  2373.             }
  2374.         }
  2375.         if (property_exists($fiche'DetailEmail') && !is_object($fiche->DetailEmail))
  2376.             $this->setEmail((string)$fiche->DetailEmail);
  2377.         elseif (property_exists($fiche'Email') && !is_object($fiche->Email))
  2378.             $this->setEmail((string)$fiche->Email);
  2379.         elseif (property_exists($fiche'CommMail') && !is_object($fiche->CommMail))
  2380.             $this->setEmail((string)$fiche->CommMail);
  2381.         elseif (property_exists($fiche'CoordonneesEmail') && !is_object($fiche->CoordonneesEmail))
  2382.             $this->setEmail((string)$fiche->CoordonneesEmail);
  2383.         elseif (property_exists($fiche'MAIL') && !is_object($fiche->MAIL))
  2384.             $this->setEmail((string)$fiche->MAIL);
  2385.         if (property_exists($fiche'DetailTel') && !is_object($fiche->DetailTel))
  2386.             $this->setPhone((string)$fiche->DetailTel);
  2387.         elseif (property_exists($fiche'Tel') && !is_object($fiche->Tel))
  2388.             $this->setPhone((string)$fiche->Tel);
  2389.         elseif (property_exists($fiche'TEL') && !is_object($fiche->TEL))
  2390.             $this->setPhone((string)$fiche->TEL);
  2391.         elseif (property_exists($fiche'CommTel') && !is_object($fiche->CommTel))
  2392.             $this->setPhone((string)$fiche->CommTel);
  2393.         elseif (property_exists($fiche'CoordonneesTelfixe') && !is_object($fiche->CoordonneesTelfixe))
  2394.             $this->setPhone((string)$fiche->CoordonneesTelfixe);
  2395.         if (property_exists($fiche'DetailTelportable'))
  2396.             $this->setPhone2((string)$fiche->DetailTelportable);
  2397.         elseif (property_exists($fiche'TelPortable'))
  2398.             $this->setPhone2((string)$fiche->TelPortable);
  2399.         elseif (property_exists($fiche'CommMob'))
  2400.             $this->setPhone2((string)$fiche->CommMob);
  2401.         elseif (property_exists($fiche'CoordonneesTelmobile'))
  2402.             $this->setPhone2((string)$fiche->CoordonneesTelmobile);
  2403.         elseif (property_exists($fiche'TELMOB'))
  2404.             $this->setPhone2((string)$fiche->TELMOB);
  2405.         if (property_exists($fiche'Detailurl'))
  2406.             $this->setUrl((string)$fiche->Detailurl);
  2407.         elseif (property_exists($fiche'Url'))
  2408.             $this->setUrl((string)$fiche->Url);
  2409.         elseif (property_exists($fiche'CommWeb'))
  2410.             $this->setUrl((string)$fiche->CommWeb);
  2411.         elseif (property_exists($fiche'CoordonneesSiteweb'))
  2412.             $this->setUrl((string)$fiche->CoordonneesSiteweb);
  2413.         elseif (property_exists($fiche'URL'))
  2414.             $this->setUrl((string)$fiche->URL);
  2415.         if (property_exists($fiche'DetailDescriptifOT'))
  2416.             $this->setComment((string)$fiche->DetailDescriptifOT);
  2417.         elseif (property_exists($fiche'Descriptif'))
  2418.             $this->setComment((string)$fiche->Descriptif);
  2419.         elseif (property_exists($fiche'Description'))
  2420.             $this->setComment((string)$fiche->Description);
  2421.         elseif (property_exists($fiche'DESCRIPTIF'))
  2422.             $this->setComment((string)$fiche->DESCRIPTIF);
  2423.         if (property_exists($fiche'DescriptifSynthetique'))
  2424.             $this->setComment2((string)$fiche->DescriptifSynthetique);
  2425.         // On stocke les données brutes de la fiche dans commentaireInterne
  2426.         // Comme il peut y avoir des mises à jour successives avec différents champs
  2427.         // On merge les infos avec l'existant
  2428.         $testemp $this->getInternalComment();
  2429.         if (isset($testemp) && $testemp != null && $testemp != '') {
  2430.             $ficheorig json_decode($testemp);
  2431.             $this->setInternalComment(json_encode((object)array_merge((array)$ficheorig, (array)$fiche)));
  2432.         } else {
  2433.             $this->setInternalComment(json_encode($fiche)); // On stocke la donnée JSON en brut dans le commentaire
  2434.         }
  2435.         // DetailContact est trop long car il peut contenir plusieurs contacts
  2436.         // if (isset($fiche->DetailContact))
  2437.         //    $this->setProviderResponsibleName((string) $fiche->DetailContact);
  2438.         if (property_exists($fiche'DetailRaisonsociale'))
  2439.             $this->setProviderName((string)$fiche->DetailRaisonsociale);
  2440.         elseif (property_exists($fiche'Raisonsociale'))
  2441.             $this->setProviderName((string)$fiche->Raisonsociale);
  2442.         if (property_exists($fiche'DetailSiteweb'))
  2443.             $this->setProviderUrl((string)$fiche->DetailSiteweb);
  2444.         elseif (property_exists($fiche'Siteweb'))
  2445.             $this->setProviderUrl((string)$fiche->Siteweb);
  2446.         if (property_exists($fiche'ObjectTypeName'))
  2447.             $this->setTypeName((string)$fiche->ObjectTypeName);
  2448.         if (property_exists($fiche'Updated') && isset($fiche->Updated)) {
  2449.             $tmp substr($fiche->Updated019);
  2450.             $tmp str_replace('T'' '$tmp);
  2451.             $tmp date_create_from_format("Y-m-d H:i:s"$tmp);
  2452.             if ($tmp !== false)
  2453.                 $this->setUpdatedAt($tmp);
  2454.         }
  2455.         if (property_exists($fiche'DATEMAJDISPO') && isset($fiche->DATEMAJDISPO) && strlen($fiche->DATEMAJDISPO) == 10) {
  2456.             $tmp date_create_from_format("d/m/Y"$fiche->DATEMAJDISPO);
  2457.             if ($tmp !== false)
  2458.                 $this->setMaxUpdate($tmp);
  2459.         }
  2460.         $this->setMarking(MarkingCodesMask::TOURINSOFT);
  2461.     }
  2462.     public function getInternalComment(): ?string
  2463.     {
  2464.         return $this->internalComment;
  2465.     }
  2466.     public function setInternalComment(?string $internalComment): self
  2467.     {
  2468.         $this->internalComment $internalComment;
  2469.         return $this;
  2470.     }
  2471.     public function bindApidaeDatas($fiche$languages = array())
  2472.     {
  2473.         // http://wcf.tourinsoft.com/Syndication/cdt37/339e9b43-b094-4871-867a-18d8dbdb7b20/Objects('ACCCEN0370007P')?$format=json
  2474.         $this->setProductTextKey($fiche['identifier']);
  2475.         if (isset($fiche['nom']) && isset($fiche['nom']['libelleFr']))
  2476.             $this->setName((string)$fiche['nom']['libelleFr']);
  2477.         else
  2478.             return false;
  2479.         if (isset($fiche['id']))
  2480.             $this->setProductCode($fiche['id']);
  2481.         else
  2482.             return false;
  2483.         // Patch 10.07.2023 : on remet les champ à null pour prendre en compte les effacements côté apidae
  2484.         $this->setPhone(null);
  2485.         $this->setPhone2(null);
  2486.         $this->setPhone3(null);
  2487.         $this->setUrl(null);
  2488.         $this->setEmail(null);
  2489.         $this->setLocationName(null);
  2490.         $this->setAddress(null);
  2491.         $this->setStreetName(null);
  2492.         $this->setAdditionAddress(null);
  2493.         $this->setSpecialDistributionAddress(null);
  2494.         $this->setZipCode(null);
  2495.         $this->setCity(null);
  2496.         $this->setInsee(null);
  2497.         $this->setComment(null);
  2498.         // Patch 10/06/2022 : il peut y avoir des doublons dans ce code et il semble inutile
  2499.         // $this->setProductTextKey($fiche['identifier']);
  2500.         if (isset($fiche['informations']) && isset($fiche['informations']['moyensCommunication'])) {
  2501.             $nbPhone 0;
  2502.             foreach ($fiche['informations']['moyensCommunication'] as $moycomm) {
  2503.                 $typecomm '';
  2504.                 if (isset($moycomm['type']) && isset($moycomm['type']['id']) && isset($moycomm['coordonnees']) && isset($moycomm['coordonnees']['fr']))
  2505.                     $typecomm = (string)$moycomm['type']['id'];
  2506.                 if ($typecomm != '') {
  2507.                     switch ($typecomm) {
  2508.                         case "201"// TEL
  2509.                             if($nbPhone == 0)
  2510.                                 $this->setPhone($moycomm['coordonnees']['fr']);
  2511.                             elseif($nbPhone == 1)
  2512.                                 $this->setPhone2($moycomm['coordonnees']['fr']);
  2513.                             elseif($nbPhone == 2)
  2514.                                 $this->setPhone3($moycomm['coordonnees']['fr']);
  2515.                             $nbPhone++;
  2516.                             break;
  2517.                         case "204"// MAIL
  2518.                             $this->setEmail($moycomm['coordonnees']['fr']);
  2519.                             break;
  2520.                         case "205"// URL
  2521.                             $this->setUrl($moycomm['coordonnees']['fr']);
  2522.                             break;
  2523.                         default: // TEL
  2524.                             // TODO : intégrer les autres données en critère
  2525.                             // $this->setPhone($moycomm['coordonnees']['fr']);
  2526.                             break;
  2527.                     }
  2528.                 }
  2529.             }
  2530.         }
  2531.         if (isset($fiche['presentation']) && isset($fiche['presentation']['descriptifCourt']) && isset($fiche['presentation']['descriptifCourt']['libelleFr'])) {
  2532.             $this->setComment((string)$fiche['presentation']['descriptifCourt']['libelleFr']);
  2533.         }
  2534.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['nomDuLieu'])) {
  2535.             $this->setLocationName((string)$fiche['localisation']['adresse']['nomDuLieu']);
  2536.         } else {
  2537.             $this->setLocationName(null);
  2538.         }
  2539.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['adresse1'])) {
  2540.             $this->setAddress((string)$fiche['localisation']['adresse']['adresse1']);
  2541.             $this->setStreetName((string)$fiche['localisation']['adresse']['adresse1']);
  2542.         } else {
  2543.             $this->setStreetName(null);
  2544.         }
  2545.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['adresse2'])) {
  2546.             $this->setAdditionAddress((string)$fiche['localisation']['adresse']['adresse2']);
  2547.         } else {
  2548.             $this->setAdditionAddress(null);
  2549.         }
  2550.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['adresse3'])) {
  2551.             $this->setSpecialDistributionAddress((string)$fiche['localisation']['adresse']['adresse3']);
  2552.         } else {
  2553.             $this->setSpecialDistributionAddress(null);
  2554.         }
  2555.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['codePostal'])) {
  2556.             $this->setZipCode((string)$fiche['localisation']['adresse']['codePostal']);
  2557.         } else {
  2558.             $this->setZipCode(null);
  2559.         }
  2560.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['commune']) && isset($fiche['localisation']['adresse']['commune']['nom'])) {
  2561.             $this->setCity((string)$fiche['localisation']['adresse']['commune']['nom']);
  2562.         } else {
  2563.             $this->setCity(null);
  2564.         }
  2565.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['commune']) && isset($fiche['localisation']['adresse']['commune']['code'])) {
  2566.             $this->setInsee((string)$fiche['localisation']['adresse']['commune']['code']);
  2567.         }
  2568.         if (isset($fiche['localisation']) && isset($fiche['localisation']['geolocalisation']) && isset($fiche['localisation']['geolocalisation']['geoJson']) && isset($fiche['localisation']['geolocalisation']['geoJson']['coordinates'])) {
  2569.             // echo "\nLATLON IS DEFINED";
  2570.             $longitude = ((double)$fiche['localisation']['geolocalisation']['geoJson']['coordinates'][0]);
  2571.             $latitude = ((double)$fiche['localisation']['geolocalisation']['geoJson']['coordinates'][1]);
  2572.             if (abs((float)$longitude) >= && abs((float)$longitude) <= 180 && abs((float)$latitude) >= && abs((float)$latitude) < 90) {
  2573.                 $this->setLongitude((double)$longitude);
  2574.                 $this->setLatitude((double)$latitude);
  2575.                 // Patch 08/08/19 : ajout du cast string
  2576.                 // Patch JM 03/02/2022 : les points sont en LON LAT et non pas LAT LON
  2577.                 // $point = new \LongitudeOne\Spatial\PHP\Types\Geometry\Point($this->getLongitude(), $this->getLatitude());
  2578.                 //$point->setSrid("4326");
  2579.                 // $this->setGeoPoint($point);
  2580.                 $this->setGeoPoint('SRID=4326;POINT(' $this->getLongitude() . ' ' $this->getLatitude() . ')');
  2581.             }
  2582.         }
  2583.         $this->setMarking(MarkingCodesMask::APIDAE);
  2584.     }
  2585.     public function __toString()
  2586.     {
  2587.         return $this->getName();
  2588.     }
  2589.     public function getName(): ?string
  2590.     {
  2591.         return $this->name;
  2592.     }
  2593.     public function setName(?string $name): self
  2594.     {
  2595.         $this->name $name;
  2596.         return $this;
  2597.     }
  2598.     public function getSlug(): ?string
  2599.     {
  2600.         return $this->slug;
  2601.     }
  2602.     public function setSlug(?string $slug): self
  2603.     {
  2604.         $this->slug $slug;
  2605.         return $this;
  2606.     }
  2607.     public function getProviderTextKey(): ?string
  2608.     {
  2609.         return $this->providerTextKey;
  2610.     }
  2611.     public function setProviderTextKey(?string $key): self
  2612.     {
  2613.         $this->providerTextKey $key;
  2614.         return $this;
  2615.     }
  2616.     /**
  2617.      * @return Collection|DnsitProductDispo[]
  2618.      */
  2619.     public function getDispos(): Collection
  2620.     {
  2621.         return $this->dispos;
  2622.     }
  2623.     public function addDispo(DnsitProductDispo $dispo): self
  2624.     {
  2625.         if (!$this->dispos->contains($dispo)) {
  2626.             $this->dispos[] = $dispo;
  2627.             $dispo->setProduct($this);
  2628.         }
  2629.         return $this;
  2630.     }
  2631.     public function removeDispo(DnsitProductDispo $dispo): self
  2632.     {
  2633.         if ($this->dispos->contains($dispo)) {
  2634.             $this->dispos->removeElement($dispo);
  2635.             // set the owning side to null (unless already changed)
  2636.             if ($dispo->getProduct() === $this) {
  2637.                 $dispo->setProduct(null);
  2638.             }
  2639.         }
  2640.         return $this;
  2641.     }
  2642.     /**
  2643.      * @return Collection|WebFilterResult[]
  2644.      */
  2645.     public function getWebFilterResults(): Collection
  2646.     {
  2647.         return $this->webFilterResults;
  2648.     }
  2649.     public function addWebFilterResult(WebFilterResult $webFilterResult): self
  2650.     {
  2651.         if (!$this->webFilterResults->contains($webFilterResult)) {
  2652.             $this->webFilterResults[] = $webFilterResult;
  2653.             $webFilterResult->setProduct($this);
  2654.         }
  2655.         return $this;
  2656.     }
  2657.     public function removeWebFilterResult(WebFilterResult $webFilterResult): self
  2658.     {
  2659.         if ($this->webFilterResults->contains($webFilterResult)) {
  2660.             $this->webFilterResults->removeElement($webFilterResult);
  2661.             // set the owning side to null (unless already changed)
  2662.             if ($webFilterResult->getProduct() === $this) {
  2663.                 $webFilterResult->setProduct(null);
  2664.             }
  2665.         }
  2666.         return $this;
  2667.     }
  2668. }