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"}), @ORM\Index(name="search_product_code_idx", columns={"product_code"})})
  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.      * @var \Doctrine\Common\Collections\Collection
  754.      *
  755.      * @ORM\OneToMany(targetEntity="App\Entity\GuideAccueilDestinataire", mappedBy="destinataire", cascade={"persist","remove"})
  756.      */
  757.     private $guidesAccueil;
  758.     /**
  759.      * Constructor
  760.      */
  761.     public function __construct()
  762.     {
  763.         $this->productCriterions = new \Doctrine\Common\Collections\ArrayCollection();
  764.         $this->cacheTemps = new \Doctrine\Common\Collections\ArrayCollection();
  765.         $this->hours = new \Doctrine\Common\Collections\ArrayCollection();
  766.         $this->shortHours = new \Doctrine\Common\Collections\ArrayCollection();
  767.         $this->coupledProducts = new \Doctrine\Common\Collections\ArrayCollection();
  768.         $this->coupledCoupledProducts = new \Doctrine\Common\Collections\ArrayCollection();
  769.         $this->category = new \Doctrine\Common\Collections\ArrayCollection();
  770.         $this->dispos = new ArrayCollection();
  771.         $this->webFilterResults = new ArrayCollection();
  772.         $this->guidesAccueil = new \Doctrine\Common\Collections\ArrayCollection();
  773.     }
  774.     public static function getEntityForLan($language)
  775.     {
  776.         switch (strtolower($language)) {
  777.             case "en":
  778.                 $repository "DnsitEnProduct";
  779.                 $productClass "\App\Entity\DnsitEnProduct";
  780.                 break;
  781.             case "de":
  782.                 $repository "DnsitDeProduct";
  783.                 $productClass "\App\Entity\DnsitDeProduct";
  784.                 break;
  785.             case "nl":
  786.                 $repository "DnsitNlProduct";
  787.                 $productClass "\App\Entity\DnsitNlProduct";
  788.                 break;
  789.             case "it":
  790.                 $repository "DnsitItProduct";
  791.                 $productClass "\App\Entity\DnsitItProduct";
  792.                 break;
  793.             case "es":
  794.                 $repository "DnsitEsProduct";
  795.                 $productClass "\App\Entity\DnsitEsProduct";
  796.                 break;
  797.             default :
  798.                 $repository "DnsitProduct";
  799.                 $productClass "\App\Entity\DnsitProduct";
  800.                 break;
  801.         }
  802.         return $repository;
  803.     }
  804.     public function getProductTextKey(): ?string
  805.     {
  806.         return $this->productTextKey;
  807.     }
  808.     public function setProductTextKey(?string $productTextKey): self
  809.     {
  810.         $this->productTextKey $productTextKey;
  811.         return $this;
  812.     }
  813.     public function getProductCode(): ?int
  814.     {
  815.         return $this->productCode;
  816.     }
  817.     public function setProductCode(?int $productCode): self
  818.     {
  819.         $this->productCode $productCode;
  820.         return $this;
  821.     }
  822.     public function getProductTypeCode(): ?int
  823.     {
  824.         return $this->productTypeCode;
  825.     }
  826.     public function setProductTypeCode(?int $productTypeCode): self
  827.     {
  828.         $this->productTypeCode $productTypeCode;
  829.         return $this;
  830.     }
  831.     public function getTypeName(): ?string
  832.     {
  833.         return $this->typeName;
  834.     }
  835.     public function setTypeName(?string $typeName): self
  836.     {
  837.         $this->typeName $typeName;
  838.         return $this;
  839.     }
  840.     public function getReference(): ?string
  841.     {
  842.         return $this->reference;
  843.     }
  844.     public function setReference(?string $reference): self
  845.     {
  846.         $this->reference $reference;
  847.         return $this;
  848.     }
  849.     public function getComment(): ?string
  850.     {
  851.         return $this->comment;
  852.     }
  853.     public function setComment(?string $comment): self
  854.     {
  855.         $this->comment $comment;
  856.         return $this;
  857.     }
  858.     public function getGeorefType(): ?int
  859.     {
  860.         return $this->georefType;
  861.     }
  862.     public function setGeorefType(?int $georefType): self
  863.     {
  864.         $this->georefType $georefType;
  865.         return $this;
  866.     }
  867.     public function getGeoref(): ?int
  868.     {
  869.         return $this->georef;
  870.     }
  871.     public function setGeoref(?int $georef): self
  872.     {
  873.         $this->georef $georef;
  874.         return $this;
  875.     }
  876.     public function getDistance(): ?float
  877.     {
  878.         return $this->distance;
  879.     }
  880.     public function setDistance(?float $distance): self
  881.     {
  882.         $this->distance $distance;
  883.         return $this;
  884.     }
  885.     public function getScore(): ?float
  886.     {
  887.         return $this->score;
  888.     }
  889.     public function setScore(?float $score): self
  890.     {
  891.         $this->score $score;
  892.         return $this;
  893.     }
  894.     public function getLocationName(): ?string
  895.     {
  896.         return $this->locationName;
  897.     }
  898.     public function setLocationName(?string $locationName): self
  899.     {
  900.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  901.         if (!empty($locationName) && strlen($locationName) > 255)
  902.             return $this;
  903.         $this->locationName $locationName;
  904.         return $this;
  905.     }
  906.     public function getStreetNumber(): ?string
  907.     {
  908.         return $this->streetNumber;
  909.     }
  910.     public function setStreetNumber(?string $streetNumber): self
  911.     {
  912.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  913.         if (!empty($streetNumber) && strlen($streetNumber) > 255)
  914.             return $this;
  915.         $this->streetNumber $streetNumber;
  916.         return $this;
  917.     }
  918.     public function getStreetName(): ?string
  919.     {
  920.         return $this->streetName;
  921.     }
  922.     public function setStreetName(?string $streetName): self
  923.     {
  924.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  925.         if (!empty($streetName) && strlen($streetName) > 255)
  926.             return $this;
  927.         $this->streetName $streetName;
  928.         return $this;
  929.     }
  930.     public function getAdditionAddress(): ?string
  931.     {
  932.         return $this->additionAddress;
  933.     }
  934.     public function setAdditionAddress(?string $additionAddress): self
  935.     {
  936.         $this->additionAddress $additionAddress;
  937.         return $this;
  938.     }
  939.     public function getSpecialDistributionAddress(): ?string
  940.     {
  941.         return $this->specialDistributionAddress;
  942.     }
  943.     public function setSpecialDistributionAddress(?string $specialDistributionAddress): self
  944.     {
  945.         $this->specialDistributionAddress $specialDistributionAddress;
  946.         return $this;
  947.     }
  948.     public function getAddress(): ?string
  949.     {
  950.         return $this->address;
  951.     }
  952.     public function setAddress(?string $address): self
  953.     {
  954.         $this->address $address;
  955.         return $this;
  956.     }
  957.     public function getZipCode(): ?string
  958.     {
  959.         return $this->zipCode;
  960.     }
  961.     public function setZipCode(?string $zipCode): self
  962.     {
  963.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  964.         if (!empty($zipCode) && strlen($zipCode) > 255)
  965.             return $this;
  966.         $this->zipCode $zipCode;
  967.         return $this;
  968.     }
  969.     public function getInsee(): ?string
  970.     {
  971.         return $this->insee;
  972.     }
  973.     public function setInsee(?string $insee): self
  974.     {
  975.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  976.         if (!empty($insee) && strlen($insee) > 255)
  977.             return $this;
  978.         $this->insee $insee;
  979.         return $this;
  980.     }
  981.     public function getCity(): ?string
  982.     {
  983.         return $this->city;
  984.     }
  985.     public function setCity(?string $city): self
  986.     {
  987.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  988.         if (!empty($city) && strlen($city) > 255)
  989.             return $this;
  990.         $this->city $city;
  991.         return $this;
  992.     }
  993.     public function getCountry(): ?string
  994.     {
  995.         return $this->country;
  996.     }
  997.     public function setCountry(?string $country): self
  998.     {
  999.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1000.         if (!empty($country) && strlen($country) > 255)
  1001.             return $this;
  1002.         $this->country $country;
  1003.         return $this;
  1004.     }
  1005.     public function getPhone(): ?string
  1006.     {
  1007.         return $this->phone;
  1008.     }
  1009.     public function setPhone(?string $phone): self
  1010.     {
  1011.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1012.         if (!empty($phone) && strlen($phone) > 255)
  1013.             return $this;
  1014.         $this->phone $phone;
  1015.         return $this;
  1016.     }
  1017.     public function getPhone2(): ?string
  1018.     {
  1019.         return $this->phone2;
  1020.     }
  1021.     public function setPhone2(?string $phone2): self
  1022.     {
  1023.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1024.         if (!empty($phone2) && strlen($phone2) > 255)
  1025.             return $this;
  1026.         $this->phone2 $phone2;
  1027.         return $this;
  1028.     }
  1029.     public function getPhone3(): ?string
  1030.     {
  1031.         return $this->phone3;
  1032.     }
  1033.     public function setPhone3(?string $phone3): self
  1034.     {
  1035.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1036.         if (!empty($phone3) && strlen($phone3) > 255)
  1037.             return $this;
  1038.         $this->phone3 $phone3;
  1039.         return $this;
  1040.     }
  1041.     public function getFax(): ?string
  1042.     {
  1043.         return $this->fax;
  1044.     }
  1045.     public function setFax(?string $fax): self
  1046.     {
  1047.         $this->fax $fax;
  1048.         return $this;
  1049.     }
  1050.     public function getEmail(): ?string
  1051.     {
  1052.         return $this->email;
  1053.     }
  1054.     public function setEmail(?string $email): self
  1055.     {
  1056.         $this->email $email;
  1057.         return $this;
  1058.     }
  1059.     public function getEmail2(): ?string
  1060.     {
  1061.         return $this->email2;
  1062.     }
  1063.     public function setEmail2(?string $email2): self
  1064.     {
  1065.         $this->email2 $email2;
  1066.         return $this;
  1067.     }
  1068.     public function getUrl(): ?string
  1069.     {
  1070.         return $this->url;
  1071.     }
  1072.     public function setUrl(?string $url): self
  1073.     {
  1074.         $this->url $url;
  1075.         return $this;
  1076.     }
  1077.     public function getUrl2(): ?string
  1078.     {
  1079.         return $this->url2;
  1080.     }
  1081.     public function setUrl2(?string $url2): self
  1082.     {
  1083.         $this->url2 $url2;
  1084.         return $this;
  1085.     }
  1086.     public function getEntityManager(): ?int
  1087.     {
  1088.         return $this->entityManager;
  1089.     }
  1090.     public function setEntityManager(?int $entityManager): self
  1091.     {
  1092.         $this->entityManager $entityManager;
  1093.         return $this;
  1094.     }
  1095.     public function getProviderCode(): ?int
  1096.     {
  1097.         return $this->providerCode;
  1098.     }
  1099.     public function setProviderCode(?int $providerCode): self
  1100.     {
  1101.         $this->providerCode $providerCode;
  1102.         return $this;
  1103.     }
  1104.     public function getProviderName(): ?string
  1105.     {
  1106.         return $this->providerName;
  1107.     }
  1108.     public function setProviderName(?string $providerName): self
  1109.     {
  1110.         $this->providerName $providerName;
  1111.         return $this;
  1112.     }
  1113.     public function getProviderCivility(): ?string
  1114.     {
  1115.         return $this->providerCivility;
  1116.     }
  1117.     public function setProviderCivility(?string $providerCivility): self
  1118.     {
  1119.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1120.         if (!empty($providerCivility) && strlen($providerCivility) > 255)
  1121.             return $this;
  1122.         $this->providerCivility $providerCivility;
  1123.         return $this;
  1124.     }
  1125.     public function getProviderResponsibleName(): ?string
  1126.     {
  1127.         return $this->providerResponsibleName;
  1128.     }
  1129.     public function setProviderResponsibleName(?string $providerResponsibleName): self
  1130.     {
  1131.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1132.         if (!empty($providerResponsibleName) && strlen($providerResponsibleName) > 255)
  1133.             return $this;
  1134.         $this->providerResponsibleName $providerResponsibleName;
  1135.         return $this;
  1136.     }
  1137.     public function getProviderResponsibleFirstname(): ?string
  1138.     {
  1139.         return $this->providerResponsibleFirstname;
  1140.     }
  1141.     public function setProviderResponsibleFirstname(?string $providerResponsibleFirstname): self
  1142.     {
  1143.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1144.         if (!empty($providerResponsibleFirstname) && strlen($providerResponsibleFirstname) > 255)
  1145.             return $this;
  1146.         $this->providerResponsibleFirstname $providerResponsibleFirstname;
  1147.         return $this;
  1148.     }
  1149.     public function getProviderLocationName(): ?string
  1150.     {
  1151.         return $this->providerLocationName;
  1152.     }
  1153.     public function setProviderLocationName(?string $providerLocationName): self
  1154.     {
  1155.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1156.         if (!empty($providerLocationName) && strlen($providerLocationName) > 255)
  1157.             return $this;
  1158.         $this->providerLocationName $providerLocationName;
  1159.         return $this;
  1160.     }
  1161.     public function getProviderStreetNumber(): ?string
  1162.     {
  1163.         return $this->providerStreetNumber;
  1164.     }
  1165.     public function setProviderStreetNumber(?string $providerStreetNumber): self
  1166.     {
  1167.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1168.         if (!empty($providerStreetNumber) && strlen($providerStreetNumber) > 255)
  1169.             return $this;
  1170.         $this->providerStreetNumber $providerStreetNumber;
  1171.         return $this;
  1172.     }
  1173.     public function getProviderStreetName(): ?string
  1174.     {
  1175.         return $this->providerStreetName;
  1176.     }
  1177.     public function setProviderStreetName(?string $providerStreetName): self
  1178.     {
  1179.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1180.         if (!empty($providerStreetName) && strlen($providerStreetName) > 255)
  1181.             return $this;
  1182.         $this->providerStreetName $providerStreetName;
  1183.         return $this;
  1184.     }
  1185.     public function getProviderAdditionAddress(): ?string
  1186.     {
  1187.         return $this->providerAdditionAddress;
  1188.     }
  1189.     public function setProviderAdditionAddress(?string $providerAdditionAddress): self
  1190.     {
  1191.         $this->providerAdditionAddress $providerAdditionAddress;
  1192.         return $this;
  1193.     }
  1194.     public function getProviderZipCode(): ?string
  1195.     {
  1196.         return $this->providerZipCode;
  1197.     }
  1198.     public function setProviderZipCode(?string $providerZipCode): self
  1199.     {
  1200.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1201.         if (!empty($providerZipCode) && strlen($providerZipCode) > 255)
  1202.             return $this;
  1203.         $this->providerZipCode $providerZipCode;
  1204.         return $this;
  1205.     }
  1206.     public function getProviderCity(): ?string
  1207.     {
  1208.         return $this->providerCity;
  1209.     }
  1210.     public function setProviderCity(?string $providerCity): self
  1211.     {
  1212.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1213.         if (!empty($providerCity) && strlen($providerCity) > 255)
  1214.             return $this;
  1215.         $this->providerCity $providerCity;
  1216.         return $this;
  1217.     }
  1218.     public function getProviderCountry(): ?string
  1219.     {
  1220.         return $this->providerCountry;
  1221.     }
  1222.     public function setProviderCountry(?string $providerCountry): self
  1223.     {
  1224.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1225.         if (!empty($providerCountry) && strlen($providerCountry) > 255)
  1226.             return $this;
  1227.         $this->providerCountry $providerCountry;
  1228.         return $this;
  1229.     }
  1230.     public function getProviderPhone(): ?string
  1231.     {
  1232.         return $this->providerPhone;
  1233.     }
  1234.     public function setProviderPhone(?string $providerPhone): self
  1235.     {
  1236.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1237.         if (!empty($providerPhone) && strlen($providerPhone) > 255)
  1238.             return $this;
  1239.         $this->providerPhone $providerPhone;
  1240.         return $this;
  1241.     }
  1242.     public function getProviderPhone2(): ?string
  1243.     {
  1244.         return $this->providerPhone2;
  1245.     }
  1246.     public function setProviderPhone2(?string $providerPhone2): self
  1247.     {
  1248.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1249.         if (!empty($providerPhone2) && strlen($providerPhone2) > 255)
  1250.             return $this;
  1251.         $this->providerPhone2 $providerPhone2;
  1252.         return $this;
  1253.     }
  1254.     public function getProviderPhone3(): ?string
  1255.     {
  1256.         return $this->providerPhone3;
  1257.     }
  1258.     public function setProviderPhone3(?string $providerPhone3): self
  1259.     {
  1260.         // Patch DN 12/2020 : Touroinsoft ne controle pas la longueur de ses champs !!!
  1261.         if (!empty($providerPhone3) && strlen($providerPhone3) > 255)
  1262.             return $this;
  1263.         $this->providerPhone3 $providerPhone3;
  1264.         return $this;
  1265.     }
  1266.     public function getProviderFax(): ?string
  1267.     {
  1268.         return $this->providerFax;
  1269.     }
  1270.     public function setProviderFax(?string $providerFax): self
  1271.     {
  1272.         $this->providerFax $providerFax;
  1273.         return $this;
  1274.     }
  1275.     public function getProviderEmail(): ?string
  1276.     {
  1277.         return $this->providerEmail;
  1278.     }
  1279.     public function setProviderEmail(?string $providerEmail): self
  1280.     {
  1281.         $this->providerEmail $providerEmail;
  1282.         return $this;
  1283.     }
  1284.     public function getProviderEmail2(): ?string
  1285.     {
  1286.         return $this->providerEmail2;
  1287.     }
  1288.     public function setProviderEmail2(?string $providerEmail2): self
  1289.     {
  1290.         $this->providerEmail2 $providerEmail2;
  1291.         return $this;
  1292.     }
  1293.     public function getProviderUrl(): ?string
  1294.     {
  1295.         return $this->providerUrl;
  1296.     }
  1297.     public function setProviderUrl(?string $providerUrl): self
  1298.     {
  1299.         $this->providerUrl $providerUrl;
  1300.         return $this;
  1301.     }
  1302.     public function getProviderUrl2(): ?string
  1303.     {
  1304.         return $this->providerUrl2;
  1305.     }
  1306.     public function setProviderUrl2(?string $providerUrl2): self
  1307.     {
  1308.         $this->providerUrl2 $providerUrl2;
  1309.         return $this;
  1310.     }
  1311.     public function getProviderSpecialDistribution(): ?string
  1312.     {
  1313.         return $this->providerSpecialDistribution;
  1314.     }
  1315.     public function setProviderSpecialDistribution(?string $providerSpecialDistribution): self
  1316.     {
  1317.         $this->providerSpecialDistribution $providerSpecialDistribution;
  1318.         return $this;
  1319.     }
  1320.     public function getContactCivility(): ?string
  1321.     {
  1322.         return $this->contactCivility;
  1323.     }
  1324.     public function setContactCivility(?string $contactCivility): self
  1325.     {
  1326.         $this->contactCivility $contactCivility;
  1327.         return $this;
  1328.     }
  1329.     public function getContactLastname(): ?string
  1330.     {
  1331.         return $this->contactLastname;
  1332.     }
  1333.     public function setContactLastname(?string $contactLastname): self
  1334.     {
  1335.         $this->contactLastname $contactLastname;
  1336.         return $this;
  1337.     }
  1338.     public function getContactFirstName(): ?string
  1339.     {
  1340.         return $this->contactFirstName;
  1341.     }
  1342.     public function setContactFirstName(?string $contactFirstName): self
  1343.     {
  1344.         $this->contactFirstName $contactFirstName;
  1345.         return $this;
  1346.     }
  1347.     public function getManagerCivility(): ?string
  1348.     {
  1349.         return $this->managerCivility;
  1350.     }
  1351.     public function setManagerCivility(?string $managerCivility): self
  1352.     {
  1353.         $this->managerCivility $managerCivility;
  1354.         return $this;
  1355.     }
  1356.     public function getManagerLastname(): ?string
  1357.     {
  1358.         return $this->managerLastname;
  1359.     }
  1360.     public function setManagerLastname(?string $managerLastname): self
  1361.     {
  1362.         $this->managerLastname $managerLastname;
  1363.         return $this;
  1364.     }
  1365.     public function getManagerFirstName(): ?string
  1366.     {
  1367.         return $this->managerFirstName;
  1368.     }
  1369.     public function setManagerFirstName(?string $managerFirstName): self
  1370.     {
  1371.         $this->managerFirstName $managerFirstName;
  1372.         return $this;
  1373.     }
  1374.     public function getManagerStreetNumber(): ?string
  1375.     {
  1376.         return $this->managerStreetNumber;
  1377.     }
  1378.     public function setManagerStreetNumber(?string $managerStreetNumber): self
  1379.     {
  1380.         $this->managerStreetNumber $managerStreetNumber;
  1381.         return $this;
  1382.     }
  1383.     public function getManagerStreetName(): ?string
  1384.     {
  1385.         return $this->managerStreetName;
  1386.     }
  1387.     public function setManagerStreetName(?string $managerStreetName): self
  1388.     {
  1389.         $this->managerStreetName $managerStreetName;
  1390.         return $this;
  1391.     }
  1392.     public function getManagerAdditionAddress(): ?string
  1393.     {
  1394.         return $this->managerAdditionAddress;
  1395.     }
  1396.     public function setManagerAdditionAddress(?string $managerAdditionAddress): self
  1397.     {
  1398.         $this->managerAdditionAddress $managerAdditionAddress;
  1399.         return $this;
  1400.     }
  1401.     public function getManagerZipCode(): ?string
  1402.     {
  1403.         return $this->managerZipCode;
  1404.     }
  1405.     public function setManagerZipCode(?string $managerZipCode): self
  1406.     {
  1407.         $this->managerZipCode $managerZipCode;
  1408.         return $this;
  1409.     }
  1410.     public function getManagerCity(): ?string
  1411.     {
  1412.         return $this->managerCity;
  1413.     }
  1414.     public function setManagerCity(?string $managerCity): self
  1415.     {
  1416.         $this->managerCity $managerCity;
  1417.         return $this;
  1418.     }
  1419.     public function getManagerCountry(): ?string
  1420.     {
  1421.         return $this->managerCountry;
  1422.     }
  1423.     public function setManagerCountry(?string $managerCountry): self
  1424.     {
  1425.         $this->managerCountry $managerCountry;
  1426.         return $this;
  1427.     }
  1428.     public function getManagerPhone(): ?string
  1429.     {
  1430.         return $this->managerPhone;
  1431.     }
  1432.     public function setManagerPhone(?string $managerPhone): self
  1433.     {
  1434.         $this->managerPhone $managerPhone;
  1435.         return $this;
  1436.     }
  1437.     public function getManagerPhone2(): ?string
  1438.     {
  1439.         return $this->managerPhone2;
  1440.     }
  1441.     public function setManagerPhone2(?string $managerPhone2): self
  1442.     {
  1443.         $this->managerPhone2 $managerPhone2;
  1444.         return $this;
  1445.     }
  1446.     public function getManagerPhone3(): ?string
  1447.     {
  1448.         return $this->managerPhone3;
  1449.     }
  1450.     public function setManagerPhone3(?string $managerPhone3): self
  1451.     {
  1452.         $this->managerPhone3 $managerPhone3;
  1453.         return $this;
  1454.     }
  1455.     public function getManagerFax(): ?string
  1456.     {
  1457.         return $this->managerFax;
  1458.     }
  1459.     public function setManagerFax(?string $managerFax): self
  1460.     {
  1461.         $this->managerFax $managerFax;
  1462.         return $this;
  1463.     }
  1464.     public function getManagerEmail(): ?string
  1465.     {
  1466.         return $this->managerEmail;
  1467.     }
  1468.     public function setManagerEmail(?string $managerEmail): self
  1469.     {
  1470.         $this->managerEmail $managerEmail;
  1471.         return $this;
  1472.     }
  1473.     public function getManagerEmail2(): ?string
  1474.     {
  1475.         return $this->managerEmail2;
  1476.     }
  1477.     public function setManagerEmail2(?string $managerEmail2): self
  1478.     {
  1479.         $this->managerEmail2 $managerEmail2;
  1480.         return $this;
  1481.     }
  1482.     public function getManagerUrl(): ?string
  1483.     {
  1484.         return $this->managerUrl;
  1485.     }
  1486.     public function setManagerUrl(?string $managerUrl): self
  1487.     {
  1488.         $this->managerUrl $managerUrl;
  1489.         return $this;
  1490.     }
  1491.     public function getManagerUrl2(): ?string
  1492.     {
  1493.         return $this->managerUrl2;
  1494.     }
  1495.     public function setManagerUrl2(?string $managerUrl2): self
  1496.     {
  1497.         $this->managerUrl2 $managerUrl2;
  1498.         return $this;
  1499.     }
  1500.     public function getManagerSpecialDistribution(): ?string
  1501.     {
  1502.         return $this->managerSpecialDistribution;
  1503.     }
  1504.     public function setManagerSpecialDistribution(?string $managerSpecialDistribution): self
  1505.     {
  1506.         $this->managerSpecialDistribution $managerSpecialDistribution;
  1507.         return $this;
  1508.     }
  1509.     public function getComment1(): ?string
  1510.     {
  1511.         return $this->comment1;
  1512.     }
  1513.     public function setComment1(?string $comment1): self
  1514.     {
  1515.         $this->comment1 $comment1;
  1516.         return $this;
  1517.     }
  1518.     public function getComment2(): ?string
  1519.     {
  1520.         return $this->comment2;
  1521.     }
  1522.     public function setComment2(?string $comment2): self
  1523.     {
  1524.         $this->comment2 $comment2;
  1525.         return $this;
  1526.     }
  1527.     public function getComment7(): ?string
  1528.     {
  1529.         return $this->comment7;
  1530.     }
  1531.     public function setComment7(?string $comment7): self
  1532.     {
  1533.         $this->comment7 $comment7;
  1534.         return $this;
  1535.     }
  1536.     public function getComment8(): ?string
  1537.     {
  1538.         return $this->comment8;
  1539.     }
  1540.     public function setComment8(?string $comment8): self
  1541.     {
  1542.         $this->comment8 $comment8;
  1543.         return $this;
  1544.     }
  1545.     public function getComment9(): ?string
  1546.     {
  1547.         return $this->comment9;
  1548.     }
  1549.     public function setComment9(?string $comment9): self
  1550.     {
  1551.         $this->comment9 $comment9;
  1552.         return $this;
  1553.     }
  1554.     public function getCommentHtml(): ?string
  1555.     {
  1556.         return $this->commentHtml;
  1557.     }
  1558.     public function setCommentHtml(?string $commentHtml): self
  1559.     {
  1560.         $this->commentHtml $commentHtml;
  1561.         return $this;
  1562.     }
  1563.     public function getCommentHtml2(): ?string
  1564.     {
  1565.         return $this->commentHtml2;
  1566.     }
  1567.     public function setCommentHtml2(?string $commentHtml2): self
  1568.     {
  1569.         $this->commentHtml2 $commentHtml2;
  1570.         return $this;
  1571.     }
  1572.     public function getCommentHtml3(): ?string
  1573.     {
  1574.         return $this->commentHtml3;
  1575.     }
  1576.     public function setCommentHtml3(?string $commentHtml3): self
  1577.     {
  1578.         $this->commentHtml3 $commentHtml3;
  1579.         return $this;
  1580.     }
  1581.     public function getMemo1(): ?string
  1582.     {
  1583.         return $this->memo1;
  1584.     }
  1585.     public function setMemo1(?string $memo1): self
  1586.     {
  1587.         $this->memo1 $memo1;
  1588.         return $this;
  1589.     }
  1590.     public function getMemo2(): ?string
  1591.     {
  1592.         return $this->memo2;
  1593.     }
  1594.     public function setMemo2(?string $memo2): self
  1595.     {
  1596.         $this->memo2 $memo2;
  1597.         return $this;
  1598.     }
  1599.     public function getMemo3(): ?string
  1600.     {
  1601.         return $this->memo3;
  1602.     }
  1603.     public function setMemo3(?string $memo3): self
  1604.     {
  1605.         $this->memo3 $memo3;
  1606.         return $this;
  1607.     }
  1608.     public function getDocumentationf(): ?string
  1609.     {
  1610.         return $this->documentationf;
  1611.     }
  1612.     public function setDocumentationf(?string $documentationf): self
  1613.     {
  1614.         $this->documentationf $documentationf;
  1615.         return $this;
  1616.     }
  1617.     public function getDocumentationl1(): ?string
  1618.     {
  1619.         return $this->documentationl1;
  1620.     }
  1621.     public function setDocumentationl1(?string $documentationl1): self
  1622.     {
  1623.         $this->documentationl1 $documentationl1;
  1624.         return $this;
  1625.     }
  1626.     public function getDocumentationl2(): ?string
  1627.     {
  1628.         return $this->documentationl2;
  1629.     }
  1630.     public function setDocumentationl2(?string $documentationl2): self
  1631.     {
  1632.         $this->documentationl2 $documentationl2;
  1633.         return $this;
  1634.     }
  1635.     public function getKml(): ?string
  1636.     {
  1637.         return $this->kml;
  1638.     }
  1639.     public function setKml(?string $kml): self
  1640.     {
  1641.         $this->kml $kml;
  1642.         return $this;
  1643.     }
  1644.     public function getGeoPoint()
  1645.     {
  1646.         return $this->geoPoint;
  1647.     }
  1648.     public function setGeoPoint($geoPoint): self
  1649.     {
  1650.         $this->geoPoint $geoPoint;
  1651.         return $this;
  1652.     }
  1653.     public function getGeoLinestring()
  1654.     {
  1655.         return $this->geoLinestring;
  1656.     }
  1657.     public function setGeoLinestring($geoLinestring): self
  1658.     {
  1659.         $this->geoLinestring $geoLinestring;
  1660.         return $this;
  1661.     }
  1662.     public function getEntite(): ?int
  1663.     {
  1664.         return $this->entite;
  1665.     }
  1666.     public function setEntite(?int $entite): self
  1667.     {
  1668.         $this->entite $entite;
  1669.         return $this;
  1670.     }
  1671.     public function getMarking(): ?int
  1672.     {
  1673.         return $this->marking;
  1674.     }
  1675.     public function setMarking(?int $marking): self
  1676.     {
  1677.         $this->marking $marking;
  1678.         return $this;
  1679.     }
  1680.     public function getParams(): ?string
  1681.     {
  1682.         return $this->params;
  1683.     }
  1684.     public function setParams(?string $params): self
  1685.     {
  1686.         $this->params $params;
  1687.         return $this;
  1688.     }
  1689.     public function getIsValid(): ?bool
  1690.     {
  1691.         return $this->isValid;
  1692.     }
  1693.     public function setIsValid(?bool $isValid): self
  1694.     {
  1695.         $this->isValid $isValid;
  1696.         return $this;
  1697.     }
  1698.     public function getValidFrom(): ?\DateTimeInterface
  1699.     {
  1700.         return $this->validFrom;
  1701.     }
  1702.     public function setValidFrom(?\DateTimeInterface $validFrom): self
  1703.     {
  1704.         $this->validFrom $validFrom;
  1705.         return $this;
  1706.     }
  1707.     public function getValidTo(): ?\DateTimeInterface
  1708.     {
  1709.         return $this->validTo;
  1710.     }
  1711.     public function setValidTo(?\DateTimeInterface $validTo): self
  1712.     {
  1713.         $this->validTo $validTo;
  1714.         return $this;
  1715.     }
  1716.     public function getMaxUpdate(): ?\DateTimeInterface
  1717.     {
  1718.         return $this->maxUpdate;
  1719.     }
  1720.     public function setMaxUpdate(?\DateTimeInterface $maxUpdate): self
  1721.     {
  1722.         $this->maxUpdate $maxUpdate;
  1723.         return $this;
  1724.     }
  1725.     public function getCreatedAt(): ?\DateTimeInterface
  1726.     {
  1727.         return $this->createdAt;
  1728.     }
  1729.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  1730.     {
  1731.         $this->createdAt $createdAt;
  1732.         return $this;
  1733.     }
  1734.     public function getCreatedBy(): ?int
  1735.     {
  1736.         return $this->created_by;
  1737.     }
  1738.     public function setCreatedBy(?int $created_by): self
  1739.     {
  1740.         $this->created_by $created_by;
  1741.         return $this;
  1742.     }
  1743.     public function getUpdatedAt(): ?\DateTimeInterface
  1744.     {
  1745.         return $this->updatedAt;
  1746.     }
  1747.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  1748.     {
  1749.         $this->updatedAt $updatedAt;
  1750.         return $this;
  1751.     }
  1752.     public function getUpdatedBy(): ?int
  1753.     {
  1754.         return $this->updatedBy;
  1755.     }
  1756.     public function setUpdatedBy(?int $updatedBy): self
  1757.     {
  1758.         $this->updatedBy $updatedBy;
  1759.         return $this;
  1760.     }
  1761.     public function getAlea(): ?int
  1762.     {
  1763.         return $this->alea;
  1764.     }
  1765.     public function setAlea(?int $alea): self
  1766.     {
  1767.         $this->alea $alea;
  1768.         return $this;
  1769.     }
  1770.     public function getDocument(): ?string
  1771.     {
  1772.         return $this->document;
  1773.     }
  1774.     public function setDocument(?string $document): self
  1775.     {
  1776.         $this->document $document;
  1777.         return $this;
  1778.     }
  1779.     public function getId(): ?int
  1780.     {
  1781.         return $this->id;
  1782.     }
  1783.     /**
  1784.      * @return Collection|DnsitProductCriterion[]
  1785.      */
  1786.     public function getProductCriterions(): Collection
  1787.     {
  1788.         return $this->productCriterions;
  1789.     }
  1790.     public function addProductCriterion(DnsitProductCriterion $productCriterion): self
  1791.     {
  1792.         if (!$this->productCriterions->contains($productCriterion)) {
  1793.             $this->productCriterions[] = $productCriterion;
  1794.             $productCriterion->setProduct($this);
  1795.         }
  1796.         return $this;
  1797.     }
  1798.     public function removeProductCriterion(DnsitProductCriterion $productCriterion): self
  1799.     {
  1800.         if ($this->productCriterions->contains($productCriterion)) {
  1801.             $this->productCriterions->removeElement($productCriterion);
  1802.             // set the owning side to null (unless already changed)
  1803.             if ($productCriterion->getProduct() === $this) {
  1804.                 $productCriterion->setProduct(null);
  1805.             }
  1806.         }
  1807.         return $this;
  1808.     }
  1809.     /**
  1810.      * @return Collection|CacheTemp[]
  1811.      */
  1812.     public function getCacheTemps(): Collection
  1813.     {
  1814.         return $this->cacheTemps;
  1815.     }
  1816.     public function addCacheTemp(CacheTemp $cacheTemp): self
  1817.     {
  1818.         if (!$this->cacheTemps->contains($cacheTemp)) {
  1819.             $this->cacheTemps[] = $cacheTemp;
  1820.             $cacheTemp->setProduct($this);
  1821.         }
  1822.         return $this;
  1823.     }
  1824.     public function removeCacheTemp(CacheTemp $cacheTemp): self
  1825.     {
  1826.         if ($this->cacheTemps->contains($cacheTemp)) {
  1827.             $this->cacheTemps->removeElement($cacheTemp);
  1828.             // set the owning side to null (unless already changed)
  1829.             if ($cacheTemp->getProduct() === $this) {
  1830.                 $cacheTemp->setProduct(null);
  1831.             }
  1832.         }
  1833.         return $this;
  1834.     }
  1835.     /**
  1836.      * @return Collection|DnsitHour[]
  1837.      */
  1838.     public function getHours(): Collection
  1839.     {
  1840.         return $this->hours;
  1841.     }
  1842.     public function addHour(DnsitHour $hour): self
  1843.     {
  1844.         if (!$this->hours->contains($hour)) {
  1845.             $this->hours[] = $hour;
  1846.             $hour->setProduct($this);
  1847.         }
  1848.         return $this;
  1849.     }
  1850.     public function removeHour(DnsitHour $hour): self
  1851.     {
  1852.         if ($this->hours->contains($hour)) {
  1853.             $this->hours->removeElement($hour);
  1854.             // set the owning side to null (unless already changed)
  1855.             if ($hour->getProduct() === $this) {
  1856.                 $hour->setProduct(null);
  1857.             }
  1858.         }
  1859.         return $this;
  1860.     }
  1861.     /**
  1862.      * @return Collection|DnsitShortHour[]
  1863.      */
  1864.     public function getShortHours(): Collection
  1865.     {
  1866.         return $this->shortHours;
  1867.     }
  1868.     public function addShortHour(DnsitShortHour $shortHour): self
  1869.     {
  1870.         if (!$this->shortHours->contains($shortHour)) {
  1871.             $this->shortHours[] = $shortHour;
  1872.             $shortHour->setProduct($this);
  1873.         }
  1874.         return $this;
  1875.     }
  1876.     public function removeShortHour(DnsitShortHour $shortHour): self
  1877.     {
  1878.         if ($this->shortHours->contains($shortHour)) {
  1879.             $this->shortHours->removeElement($shortHour);
  1880.             // set the owning side to null (unless already changed)
  1881.             if ($shortHour->getProduct() === $this) {
  1882.                 $shortHour->setProduct(null);
  1883.             }
  1884.         }
  1885.         return $this;
  1886.     }
  1887.     /**
  1888.      * @return Collection|DnsitCoupledProduct[]
  1889.      */
  1890.     public function getCoupledProducts(): Collection
  1891.     {
  1892.         return $this->coupledProducts;
  1893.     }
  1894.     public function addCoupledProduct(DnsitCoupledProduct $coupledProduct): self
  1895.     {
  1896.         if (!$this->coupledProducts->contains($coupledProduct)) {
  1897.             $this->coupledProducts[] = $coupledProduct;
  1898.             $coupledProduct->setProduct($this);
  1899.         }
  1900.         return $this;
  1901.     }
  1902.     public function removeCoupledProduct(DnsitCoupledProduct $coupledProduct): self
  1903.     {
  1904.         if ($this->coupledProducts->contains($coupledProduct)) {
  1905.             $this->coupledProducts->removeElement($coupledProduct);
  1906.             // set the owning side to null (unless already changed)
  1907.             if ($coupledProduct->getProduct() === $this) {
  1908.                 $coupledProduct->setProduct(null);
  1909.             }
  1910.         }
  1911.         return $this;
  1912.     }
  1913.     /**
  1914.      * @return Collection|DnsitCoupledProduct[]
  1915.      */
  1916.     public function getCoupledCoupledProducts(): Collection
  1917.     {
  1918.         return $this->coupledCoupledProducts;
  1919.     }
  1920.     public function addCoupledCoupledProduct(DnsitCoupledProduct $coupledCoupledProduct): self
  1921.     {
  1922.         if (!$this->coupledCoupledProducts->contains($coupledCoupledProduct)) {
  1923.             $this->coupledCoupledProducts[] = $coupledCoupledProduct;
  1924.             $coupledCoupledProduct->setCoupledProduct($this);
  1925.         }
  1926.         return $this;
  1927.     }
  1928.     public function removeCoupledCoupledProduct(DnsitCoupledProduct $coupledCoupledProduct): self
  1929.     {
  1930.         if ($this->coupledCoupledProducts->contains($coupledCoupledProduct)) {
  1931.             $this->coupledCoupledProducts->removeElement($coupledCoupledProduct);
  1932.             // set the owning side to null (unless already changed)
  1933.             if ($coupledCoupledProduct->getCoupledProduct() === $this) {
  1934.                 $coupledCoupledProduct->setCoupledProduct(null);
  1935.             }
  1936.         }
  1937.         return $this;
  1938.     }
  1939.     public function getType(): ?DnsitType
  1940.     {
  1941.         return $this->type;
  1942.     }
  1943.     public function setType(?DnsitType $type): self
  1944.     {
  1945.         $this->type $type;
  1946.         return $this;
  1947.     }
  1948.     public function getCityInsee(): ?CityInsee
  1949.     {
  1950.         return $this->cityInsee;
  1951.     }
  1952.     public function setCityInsee(?CityInsee $cityInsee): self
  1953.     {
  1954.         $this->cityInsee $cityInsee;
  1955.         return $this;
  1956.     }
  1957.     public function getProductEntity(): ?DnsitEntity
  1958.     {
  1959.         return $this->productEntity;
  1960.     }
  1961.     public function setProductEntity(?DnsitEntity $ent): self
  1962.     {
  1963.         $this->productEntity $ent;
  1964.         return $this;
  1965.     }
  1966.     public function getTranslate(): ?DnsitTranslateProduct
  1967.     {
  1968.         return $this->translate;
  1969.     }
  1970.     public function setTranslate(?DnsitTranslateProduct $translate): self
  1971.     {
  1972.         $this->translate $translate;
  1973.         return $this;
  1974.     }
  1975.     /**
  1976.      * @return Collection|DnsitProductCategory[]
  1977.      */
  1978.     public function getCategory(): Collection
  1979.     {
  1980.         return $this->category;
  1981.     }
  1982.     public function addCategory(DnsitProductCategory $category): self
  1983.     {
  1984.         if (!$this->category->contains($category)) {
  1985.             $this->category[] = $category;
  1986.         }
  1987.         return $this;
  1988.     }
  1989.     public function removeCategory(DnsitProductCategory $category): self
  1990.     {
  1991.         if ($this->category->contains($category)) {
  1992.             $this->category->removeElement($category);
  1993.         }
  1994.         return $this;
  1995.     }
  1996.     public function bindLeiDatas($fiche)
  1997.     {
  1998.         if ((integer)$fiche->PRODUIT) {
  1999.             $this->setProductCode((integer)$fiche->PRODUIT);
  2000.         }
  2001.         $longitude str_replace(",""."$fiche->LONGITUDE);
  2002.         $latitude str_replace(",""."$fiche->LATITUDE);
  2003.         if (abs((float)$longitude) >= && abs((float)$longitude) <= 180 && abs((float)$latitude) >= && abs((float)$latitude) < 90) {
  2004.             $this->setLongitude((double)$longitude);
  2005.             $this->setLatitude((double)$latitude);
  2006.             // Patch 08/08/19 : ajout du cast string
  2007.             // Patch JM 03/02/2022 : les points sont en LON LAT et non pas LAT LON
  2008.             // $point = new \LongitudeOne\Spatial\PHP\Types\Geometry\Point($this->getLongitude(), $this->getLatitude());
  2009.             // $point->setSrid("4326");
  2010.             // $this->setGeoPoint($point);
  2011.             $this->setGeoPoint('SRID=4326;POINT(' $this->getLongitude() . ' ' $this->getLatitude() . ')');
  2012.         }
  2013.         $this->setName((string)$fiche->NOM);
  2014.         $this->setAddress((string)$fiche->ADRESSE);
  2015.         $this->setStreetNumber((string)$fiche->ADRPROD_NUM_VOIE);
  2016.         $this->setStreetName((string)$fiche->ADRPROD_LIB_VOIE);
  2017.         $this->setAdditionAddress((string)$fiche->ADRPROD_COMPL_ADRESSE);
  2018.         $this->setSpecialDistributionAddress((string)$fiche->ADRPROD_DISTRI_SPE);
  2019.         $this->setZipCode((string)$fiche->ADRPROD_CP);
  2020.         $this->setInsee((string)$fiche->INSEE);
  2021.         $this->setCity((string)$fiche->ADRPROD_LIBELLE_COMMUNE);
  2022.         $this->setCountry((string)$fiche->ADRPROD_PAYS);
  2023.         if ((integer)$fiche->GEOREF) {
  2024.             $this->setGeoref((integer)$fiche->GEOREF);
  2025.         }
  2026.         if ((integer)$fiche->GEOREFTYPE) {
  2027.             $this->setGeorefType((integer)$fiche->GEOREFTYPE);
  2028.         }
  2029.         $this->setEmail((string)$fiche->ADRPROD_EMAIL);
  2030.         $this->setEmail2((string)$fiche->ADRPROD_EMAIL2);
  2031.         $this->setPhone((string)$fiche->ADRPROD_TEL);
  2032.         $this->setPhone2((string)$fiche->ADRPROD_TEL2);
  2033.         $this->setPhone3((string)$fiche->ADRPROD_TEL3);
  2034.         $this->setUrl((string)$fiche->ADRPROD_URL);
  2035.         $this->setUrl2((string)$fiche->ADRPROD_URL2);
  2036.         $this->setComment((string)$fiche->COMMENTAIRE);
  2037.         $this->setComment1((string)$fiche->COMMENTAIREL1);
  2038.         $this->setComment2((string)$fiche->COMMENTAIREL2);
  2039.         $this->setComment7((string)$fiche->COMMENTAIRE7);
  2040.         $this->setComment8((string)$fiche->COMMENTAIRE8);
  2041.         $this->setComment9((string)$fiche->COMMENTAIRE9);
  2042.         $this->setCommentHtml((string)$fiche->COMMENTAIREHTML);
  2043.         $this->setCommentHtml2((string)$fiche->COMMENTAIREHTML2);
  2044.         $this->setCommentHtml3((string)$fiche->COMMENTAIREHTML3);
  2045.         $this->setInternalComment((string)$fiche->COMMENTAIREINTERNE);
  2046.         $this->setMemo1((string)$fiche->MEMO1);
  2047.         $this->setMemo2((string)$fiche->MEMO2);
  2048.         $this->setMemo3((string)$fiche->MEMO3);
  2049.         $this->setProviderCivility((string)$fiche->PREST_CIVILITE);
  2050.         $this->setProviderResponsibleFirstname((string)$fiche->PREST_PRENOM_RESP);
  2051.         $this->setProviderResponsibleName((string)$fiche->PREST_NOM_RESP);
  2052.         $this->setProviderName((string)$fiche->PREST_NOM);
  2053.         $this->setProviderStreetNumber((string)$fiche->ADRPREST_NUM_VOIE);
  2054.         $this->setProviderStreetName((string)$fiche->ADRPREST_LIB_VOIE);
  2055.         $this->setProviderAdditionAddress((string)$fiche->ADRPREST_COMPL_ADRESSE);
  2056.         $this->setProviderZipCode((string)$fiche->ADRPREST_CP);
  2057.         $this->setProviderCity((string)$fiche->ADRPREST_LIBELLE_COMMUNE);
  2058.         $this->setProviderCountry((string)$fiche->ADRPREST_PAYS);
  2059.         $this->setProviderPhone((string)$fiche->ADRPREST_TEL);
  2060.         $this->setProviderPhone2((string)$fiche->ADRPREST_TEL2);
  2061.         $this->setProviderPhone3((string)$fiche->ADRPREST_TEL3);
  2062.         $this->setProviderEmail((string)$fiche->ADRPREST_EMAIL);
  2063.         $this->setProviderEmail2((string)$fiche->ADRPREST_EMAIL2);
  2064.         $this->setProviderUrl((string)$fiche->ADRPREST_URL);
  2065.         $this->setProviderUrl2((string)$fiche->ADRPREST_URL2);
  2066.         $this->setContactCivility((string)$fiche->CIVILITE_RESPONSABLE);
  2067.         $this->setContactFirstName((string)$fiche->PRENOM_RESPONSABLE);
  2068.         $this->setContactLastName((string)$fiche->NOM_RESPONSABLE);
  2069.         $this->setManagerCivility((string)$fiche->CIVILITE_PERSONNE_EN_CHARGE);
  2070.         $this->setManagerLastName((string)$fiche->NOM_PERSONNE_EN_CHARGE);
  2071.         $this->setManagerFirstName((string)$fiche->PRENOM_PERSONNE_EN_CHARGE);
  2072.         $this->setManagerStreetNumber((string)$fiche->ADRPEC_NUM_VOIE);
  2073.         $this->setManagerStreetName((string)$fiche->ADRPEC_LIB_VOIE);
  2074.         $this->setManagerAdditionAddress((string)$fiche->ADRPEC_COMPL_ADRESSE);
  2075.         $this->setManagerSpecialDistribution((string)$fiche->ADRPEC_DISTRI_SPE);
  2076.         $this->setManagerZipCode((string)$fiche->ADRPEC_CP);
  2077.         $this->setManagerCity((string)$fiche->ADRPEC_LIBELLE_COMMUNE);
  2078.         $this->setManagerCountry((string)$fiche->ADRPEC_PAYS);
  2079.         $this->setManagerPhone((string)$fiche->ADRPEC_TEL);
  2080.         $this->setManagerPhone2((string)$fiche->ADRPEC_TEL2);
  2081.         $this->setManagerPhone3((string)$fiche->ADRPEC_TEL3);
  2082.         $this->setManagerFax((string)$fiche->ADRPEC_FAX);
  2083.         $this->setManagerEmail((string)$fiche->ADRPEC_EMAIL);
  2084.         $this->setManagerEmail2((string)$fiche->ADRPEC_EMAIL2);
  2085.         $this->setManagerUrl((string)$fiche->ADRPEC_URL);
  2086.         $this->setManagerUrl2((string)$fiche->ADRPEC_URL2);
  2087.         $this->setDocumentationf((string)$fiche->DOCUMENTATIONF);
  2088.         $this->setDocumentationl1((string)$fiche->DOCUMENTATIONL1);
  2089.         $this->setDocumentationl2((string)$fiche->DOCUMENTATIONL2);
  2090.         $this->setTypeName((string)$fiche->TYPE_NOM);
  2091.         if ((integer)$fiche->ENTITE_GESTIONNAIRE) {
  2092.             $this->setEntityManager((integer)$fiche->ENTITE_GESTIONNAIRE);
  2093.         }
  2094.         if ((integer)$fiche->MARQUAGE) {
  2095.             $this->setMarking((integer)$fiche->MARQUAGE);
  2096.         }
  2097.         if ((integer)$fiche->PRESTATAIRE) {
  2098.             $this->setProviderCode((integer)$fiche->PRESTATAIRE);
  2099.         }
  2100.         if ((integer)$fiche->TYPE_DE_PRODUIT) {
  2101.             $this->setProductTypeCode((integer)$fiche->TYPE_DE_PRODUIT);
  2102.         }
  2103.         $tmp = (string)$fiche->DATMAJ;
  2104.         $tmp date_create_from_format("d/m/Y H:i:s"$tmp);
  2105.         if ($tmp !== false) {
  2106.             $this->setUpdatedAt($tmp);
  2107.         }
  2108.         $tmp = (string)$fiche->DATECREATION;
  2109.         $tmp date_create_from_format("d/m/Y H:i:s"$tmp);
  2110.         if ($tmp !== false)
  2111.             $this->setCreatedAt($tmp);
  2112.         $tmp = (string)$fiche->VALABLE_DEPUIS;
  2113.         $tmp date_create_from_format("d/m/Y H:i:s"$tmp);
  2114.         if ($tmp !== false)
  2115.             $this->setValidFrom($tmp);
  2116.         $tmp = (string)$fiche->VALABLE_JUSQU_A;
  2117.         $tmp date_create_from_format("d/m/Y H:i:s"$tmp);
  2118.         if ($tmp !== false)
  2119.             $this->setValidTo($tmp);
  2120.         $tmp = (string)$fiche->MAXMAJ;
  2121.         $tmp date_create_from_format("d/m/Y H:i:s"$tmp);
  2122.         if ($tmp !== false)
  2123.             $this->setMaxUpdate($tmp);
  2124.         // $this->setUpdatedAt((string) $fiche->DATMAJ);
  2125.         //$this->setCreatedAt((string) $fiche->DATECREATION);
  2126.         //$this->setValidFrom((string) $fiche->VALABLE_DEPUIS);
  2127.         // $this->setValidTo((string) $fiche->VALABLE_JUSQU_A);
  2128.         // $this->setMaxUpdate((string) $fiche->MAXMAJ);
  2129.         if ((integer)$fiche->LALEA)
  2130.             $this->setAlea((integer)$fiche->LALEA);
  2131.         // Ici on intègre le KML
  2132.         // $mods = BridgeFrontUtils::filterProductModalities($fiche->modalities,900002);
  2133.         $testKML $fiche->xpath('CRITERES/Crit[@CLEF_CRITERE=900002]');
  2134.         if (!empty($testKML) && is_array($testKML) && !empty((string)$testKML[0])) {
  2135.             $this->setKml((string)$testKML[0]);
  2136.             // on récupère le contenu de l'URL stockée dans $KML
  2137.             $urlKml $this->kml;
  2138.             // on prévoit plusieurs essais de connexion au cas où
  2139.             $nberr 0;
  2140.             $done false;
  2141.             $kmlData false;
  2142.             $ctx stream_context_create(array('http'=>
  2143.                 array(
  2144.                     'timeout' => 5,  // 5 secondes
  2145.                 )
  2146.             ));
  2147.             while (!$done && $nberr 3) {
  2148.                 try {
  2149.                     $kmlData = @file_get_contents($urlKmlfalse$ctx);
  2150.                     if ($kmlData !== false)
  2151.                         $done true;
  2152.                     else
  2153.                         $nberr++;
  2154.                 } catch (\Exception $e) {
  2155.                     $nberr++;
  2156.                 }
  2157.                 if (!$done)
  2158.                     sleep($nberr);
  2159.             }
  2160.             if ($kmlData !== false) {
  2161.                 // on charge le KML dans une géométrie
  2162.                 $lineStringKML \geoPHP::load($kmlData'kml');
  2163.                 // on s'assure qu'il s'agisse d'un élément simple et on le simplifie en tableau de points
  2164.                 $lineStringArray $this->geoPhpObjectToLineStringArray($lineStringKML);
  2165.                 if (!empty($lineStringArray)) {
  2166.                     // avec ce tableau de points, on crée un LineString PHP
  2167.                     // $lineString = new \LongitudeOne\Spatial\PHP\Types\Geometry\LineString($lineStringArray, "4326");
  2168.                     $lineString 'SRID=4326;LINESTRING(' implode(','$lineStringArray) . ')';
  2169.                     // on le passe dans geoLineString
  2170.                     $this->setGeoLineString($lineString);
  2171.                 }
  2172.             } else {
  2173.                 $this->setKml(null);
  2174.             }
  2175.         }
  2176.         $this->setMarking(MarkingCodesMask::LEI);
  2177.     }
  2178.     public function getLatitude(): ?float
  2179.     {
  2180.         return $this->latitude;
  2181.     }
  2182.     public function setLatitude(?float $latitude): self
  2183.     {
  2184.         $this->latitude $latitude;
  2185.         return $this;
  2186.     }
  2187.     public function getLongitude(): ?float
  2188.     {
  2189.         return $this->longitude;
  2190.     }
  2191.     public function setLongitude(?float $longitude): self
  2192.     {
  2193.         $this->longitude $longitude;
  2194.         return $this;
  2195.     }
  2196.     public function bindTourinsoftDatas($fiche$inutile='')
  2197.     {
  2198.         $tableau_balises_latitude = array("GmapLatitude""LAT","DetailGOOGLEMAPLATITUDE""LATITUDE");
  2199.         $tableau_balises_longitude = array("GmapLongitude""LON","DetailGOOGLEMAPLONGITUDE""LONGITUDE");
  2200.         $tableau_balises_traces = array("Itinerairegooglemap""DetailTRACEGPS""DetailTRACEGPS");
  2201.         $tableau_balises_gpx = array("GPX");
  2202.         // améliorer le code ainsi quand on en aura le courage
  2203.         $tableau_balises_nom = array("DetailNomoffre""DetailNOMOFFRE""DetailNOMMANIFESTATION""Nomoffre""Nomdeloffre""SyndicObjectName");
  2204.         $tableau_balises_ville = array("DetailCommune""DetailCOMMUNE""Commune""COMMUNE""COMMUNEPRINCIPALE""COMMUNEDEPART""Ville""COMMUNETOURISTIQUE");
  2205.         if (property_exists($fiche'DetailCommune') && !is_object($fiche->DetailCommune))
  2206.             $this->setCity((string)$fiche->DetailCommune);
  2207.         elseif (property_exists($fiche'DetailCOMMUNE') && !is_object($fiche->DetailCOMMUNE))
  2208.             $this->setCity((string)$fiche->DetailCOMMUNE);
  2209.         elseif (property_exists($fiche'Commune') && !is_object($fiche->Commune))
  2210.             $this->setCity((string)$fiche->Commune);
  2211.         elseif (property_exists($fiche'commune') && !is_object($fiche->commune))
  2212.             $this->setCity((string)$fiche->commune);
  2213.         elseif (property_exists($fiche'COMMUNE') && !is_object($fiche->COMMUNE))
  2214.             $this->setCity((string)$fiche->COMMUNE);
  2215.         elseif (property_exists($fiche'COMMUNEPRINCIPALE') && !is_object($fiche->COMMUNEPRINCIPALE))
  2216.             $this->setCity((string)$fiche->COMMUNEPRINCIPALE);
  2217.         elseif (property_exists($fiche'Ville') && !is_object($fiche->Ville))
  2218.             $this->setCity((string)$fiche->Ville);
  2219.         elseif (property_exists($fiche'COMMUNEDEPART') && !is_object($fiche->COMMUNEDEPART))
  2220.             $this->setCity((string)$fiche->COMMUNEDEPART);
  2221.         // Andernos
  2222.         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'))
  2223.             $this->setCity((string)$fiche->ADRESSEs[0]->Communetouristique->ThesLibelle);
  2224.         // http://wcf.tourinsoft.com/Syndication/cdt37/339e9b43-b094-4871-867a-18d8dbdb7b20/Objects('ACCCEN0370007P')?$format=json
  2225.         $this->setProductTextKey($fiche->SyndicObjectID);
  2226.         $this->setMarking(0);
  2227.         $longitude 91;
  2228.         $latitude 181;
  2229.         foreach($tableau_balises_latitude as $balise) {
  2230.             if (property_exists($fiche$balise) && isset($fiche->$balise)) {
  2231.                 $latitude str_replace(",""."$fiche->$balise);
  2232.             }
  2233.         }
  2234.         foreach($tableau_balises_longitude as $balise) {
  2235.             if (property_exists($fiche$balise) && isset($fiche->$balise)) {
  2236.                 $longitude str_replace(",""."$fiche->$balise);
  2237.             }
  2238.         }
  2239.         if (abs((float)$longitude) >= && abs((float)$longitude) <= 180 && abs((float)$latitude) >= && abs((float)$latitude) < 90) {
  2240.             $this->setLongitude((float)$longitude);
  2241.             $this->setLatitude((float)$latitude);
  2242.             // Patch 08/08/19 : ajout du cast string
  2243.             // $point = new \LongitudeOne\Spatial\PHP\Types\Geometry\Point($this->getLongitude(), $this->getLatitude());
  2244.             // $point->setSrid("4326");
  2245.             // $this->setGeoPoint($point);
  2246.             $this->setGeoPoint('SRID=4326;POINT(' $this->getLongitude() . ' ' $this->getLatitude() . ')');
  2247.         }
  2248.         // Nouveau 06.11.2023 : traces GPS
  2249.         $hasTrace false;
  2250.         foreach($tableau_balises_traces as $balise) {
  2251.             if(isset($fiche->$balise))
  2252.                 $data json_decode($fiche->$balise);
  2253.             if(isset($data)) break;
  2254.         }
  2255.         if (isset($data) && is_object($data) && isset($data->lignes) &&  is_array($data->lignes)) {
  2256.             // On va recoller les lignes
  2257.             $lignesCollees = array();
  2258.             foreach($data->lignes as $ligne) {
  2259.                 if(!is_object($ligne) || !isset($ligne->path))
  2260.                     continue;
  2261.                 $lignesCollees array_merge($lignesCollees$ligne->path);
  2262.             }
  2263.             $tableauWKT = array();
  2264.             if(!empty($lignesCollees)) {
  2265.                 foreach($lignesCollees as $point) {
  2266.                     if(!is_array($point) || count($point) < 2) {
  2267.                         // Il y a parfois des points vides !!!
  2268.                         continue;
  2269.                     }
  2270.                     $tableauWKT[] = $point[1] . ' ' $point[0]; // Lng lat
  2271.                 }
  2272.             }
  2273.             if(!empty($tableauWKT)) {
  2274.                 $hasTrace true;
  2275.                 $lineString 'SRID=4326;LINESTRING(' implode(','$tableauWKT) . ')';
  2276.                 $this->setGeoLinestring($lineString) ;
  2277.             }
  2278.         }
  2279.         // ND 03/02/2025 : gestion de balises portant des traces GPX
  2280.         if ($hasTrace === false) {
  2281.             $noms_balises_gpx = array("Gpx","GPX""TraceGPX");
  2282.             $baliseGPX '';
  2283.             foreach ($noms_balises_gpx as $balise) {
  2284.                 if (property_exists($fiche$balise) && isset($fiche->$balise)) {
  2285.                     $baliseGPX $balise;
  2286.                     break;
  2287.                 }
  2288.             }
  2289.             if ($baliseGPX != '') {
  2290.                 $urlGPX '';
  2291.                 if (is_object($fiche->$baliseGPX) && property_exists($fiche->$baliseGPX'Url') && is_string($fiche->$baliseGPX->Url) && $fiche->$baliseGPX->Url != '') {
  2292.                     $urlGPX = (string)$fiche->$baliseGPX->Url;
  2293.                 } elseif (is_string($fiche->$baliseGPX) && $fiche->$baliseGPX != '') {
  2294.                     $urlGPX = (string)$fiche->$baliseGPX;
  2295.                 }
  2296.                 if ($urlGPX != '') {
  2297.                     // on prévoit plusieurs essais de connexion au cas où
  2298.                     $nberr 0;
  2299.                     $done false;
  2300.                     $gpxData false;
  2301.                     $ctx stream_context_create(array('http'=>
  2302.                         array(
  2303.                             'timeout' => 5,  // 5 secondes
  2304.                         )
  2305.                     ));
  2306.                     try {
  2307.                         $gpxData = @file_get_contents($urlGPXfalse$ctx);
  2308.                     } catch (\Exception $e) {
  2309.                     }
  2310.                     if ($gpxData !== false) {
  2311.                         $gpxGeometry \geoPHP::load($gpxData'gpx');
  2312.                         // on s'assure qu'il s'agisse d'un élément simple et on le simplifie en tableau de points
  2313.                         $lineStringArray $this->geoPhpObjectToLineStringArray($gpxGeometry);
  2314.                         if (!empty($lineStringArray)) {
  2315.                             // avec ce tableau de points, on crée un LineString PHP
  2316.                             // $lineString = new \LongitudeOne\Spatial\PHP\Types\Geometry\LineString($lineStringArray, "4326");
  2317.                             $lineString 'SRID=4326;LINESTRING(' implode(','$lineStringArray) . ')';
  2318.                             // on le passe dans geoLineString
  2319.                             $this->setGeoLineString($lineString);
  2320.                         }
  2321.                     }
  2322.                 }
  2323.             }
  2324.         }
  2325.         // Fin traces GPS
  2326.         // Nom de la fiche
  2327.         foreach($tableau_balises_nom as $prop) {
  2328.             if (property_exists($fiche$prop) && !is_object($fiche->$prop))
  2329.                 $this->setName((string)$fiche->$prop);
  2330.             elseif (property_exists($fiche$prop) && is_object($fiche->$prop) && isset($fiche->$prop->ThesLibelle))
  2331.                 $this->setName((string)$fiche->$prop->ThesLibelle);
  2332.         }
  2333.         // $this->setAddress((string) $fiche->ADRESSE);
  2334.         // $this->setStreetNumber((string) $fiche->ADRPROD_NUM_VOIE);
  2335.         if (property_exists($fiche'AdresseComplete') && isset($fiche->AdresseComplete) && $fiche->AdresseComplete != '') {
  2336.             $tabadr explode('|', (string)$fiche->AdresseComplete);
  2337.             if (count($tabadr) >= 6) {
  2338.                 $this->setStreetName($tabadr[0]);
  2339.                 $this->setAdditionAddress($tabadr[1]);
  2340.                 $this->setZipCode($tabadr[4]);
  2341.                 $this->setCity($tabadr[5]);
  2342.             }
  2343.         }
  2344.         if (property_exists($fiche'DetailAdresse1') && !is_object($fiche->DetailAdresse1))
  2345.             $this->setStreetName((string)$fiche->DetailAdresse1);
  2346.         elseif (property_exists($fiche'DetailADRESSE1') && !is_object($fiche->DetailADRESSE1))
  2347.             $this->setStreetName((string)$fiche->DetailADRESSE1);
  2348.         elseif (property_exists($fiche'Adresse1') && !is_object($fiche->Adresse1))
  2349.             $this->setStreetName((string)$fiche->Adresse1);
  2350.         elseif (property_exists($fiche'AD1') && !is_object($fiche->AD1))
  2351.             $this->setStreetName((string)$fiche->AD1);
  2352.         elseif (property_exists($fiche'ADRESSE1') && !is_object($fiche->ADRESSE1))
  2353.             $this->setStreetName((string)$fiche->ADRESSE1);
  2354.         if (property_exists($fiche'DetailAdresse2') && !is_object($fiche->DetailAdresse2))
  2355.             $this->setAdditionAddress((string)$fiche->DetailAdresse2);
  2356.         elseif (property_exists($fiche'DetailADRESSE2') && !is_object($fiche->DetailADRESSE2))
  2357.             $this->setAdditionAddress((string)$fiche->DetailADRESSE2);
  2358.         elseif (property_exists($fiche'Adresse2') && !is_object($fiche->Adresse2))
  2359.             $this->setAdditionAddress((string)$fiche->Adresse2);
  2360.         elseif (property_exists($fiche'AD2') && !is_object($fiche->AD2))
  2361.             $this->setAdditionAddress((string)$fiche->AD2);
  2362.         elseif (property_exists($fiche'ADRESSE2') && !is_object($fiche->ADRESSE2))
  2363.             $this->setAdditionAddress((string)$fiche->ADRESSE2);
  2364.         if (property_exists($fiche'DetailAdresse3') && !is_object($fiche->DetailAdresse3))
  2365.             $this->setSpecialDistributionAddress((string)$fiche->DetailAdresse3);
  2366.         elseif (property_exists($fiche'DetailADRESSE3') && !is_object($fiche->DetailADRESSE3))
  2367.             $this->setSpecialDistributionAddress((string)$fiche->DetailADRESSE3);
  2368.         elseif (property_exists($fiche'AD3') && !is_object($fiche->AD3))
  2369.             $this->setSpecialDistributionAddress((string)$fiche->AD3);
  2370.         elseif (property_exists($fiche'ADRESSE3') && !is_object($fiche->ADRESSE3))
  2371.             $this->setSpecialDistributionAddress((string)$fiche->ADRESSE3);
  2372.         elseif (property_exists($fiche'Adresse3') && !is_object($fiche->Adresse3))
  2373.             $this->setSpecialDistributionAddress((string)$fiche->Adresse3);
  2374.         if (property_exists($fiche'DetailCodePostal') && !is_object($fiche->DetailCodePostal))
  2375.             $this->setZipCode((string)$fiche->DetailCodePostal);
  2376.         elseif (property_exists($fiche'DetailCODEPOSTAL') && !is_object($fiche->DetailCODEPOSTAL))
  2377.             $this->setZipCode((string)$fiche->DetailCODEPOSTAL);
  2378.         elseif (property_exists($fiche'CodePostal') && !is_object($fiche->CodePostal))
  2379.             $this->setZipCode((string)$fiche->CodePostal);
  2380.         elseif (property_exists($fiche'Codepostal') && !is_object($fiche->Codepostal))
  2381.             $this->setZipCode((string)$fiche->Codepostal);
  2382.         elseif (property_exists($fiche'CP') && !is_object($fiche->CP))
  2383.             $this->setZipCode((string)$fiche->CP);
  2384.         elseif (property_exists($fiche'CODEPOSTAL') && !is_object($fiche->CODEPOSTAL))
  2385.             $this->setZipCode((string)$fiche->CODEPOSTAL);
  2386.         // ND patch 15.02.24 : ajout du break pour traiter le tableau dans l'ordre et s'arrêter
  2387.         foreach($tableau_balises_ville as $prop) {
  2388.             if (property_exists($fiche$prop) && !is_object($fiche->$prop)) {
  2389.                 $this->setCity((string)$fiche->$prop);
  2390.                 break;
  2391.             } elseif (property_exists($fiche$prop) && is_object($fiche->$prop) && isset($fiche->$prop->ThesLibelle)) {
  2392.                 $this->setCity((string)$fiche->$prop->ThesLibelle);
  2393.                 break;
  2394.             }
  2395.         }
  2396.         if (property_exists($fiche'DetailEmail') && !is_object($fiche->DetailEmail))
  2397.             $this->setEmail((string)$fiche->DetailEmail);
  2398.         elseif (property_exists($fiche'Email') && !is_object($fiche->Email))
  2399.             $this->setEmail((string)$fiche->Email);
  2400.         elseif (property_exists($fiche'CommMail') && !is_object($fiche->CommMail))
  2401.             $this->setEmail((string)$fiche->CommMail);
  2402.         elseif (property_exists($fiche'CoordonneesEmail') && !is_object($fiche->CoordonneesEmail))
  2403.             $this->setEmail((string)$fiche->CoordonneesEmail);
  2404.         elseif (property_exists($fiche'MAIL') && !is_object($fiche->MAIL))
  2405.             $this->setEmail((string)$fiche->MAIL);
  2406.         if (property_exists($fiche'DetailTel') && !is_object($fiche->DetailTel))
  2407.             $this->setPhone((string)$fiche->DetailTel);
  2408.         elseif (property_exists($fiche'Tel') && !is_object($fiche->Tel))
  2409.             $this->setPhone((string)$fiche->Tel);
  2410.         elseif (property_exists($fiche'TEL') && !is_object($fiche->TEL))
  2411.             $this->setPhone((string)$fiche->TEL);
  2412.         elseif (property_exists($fiche'CommTel') && !is_object($fiche->CommTel))
  2413.             $this->setPhone((string)$fiche->CommTel);
  2414.         elseif (property_exists($fiche'CoordonneesTelfixe') && !is_object($fiche->CoordonneesTelfixe))
  2415.             $this->setPhone((string)$fiche->CoordonneesTelfixe);
  2416.         if (property_exists($fiche'DetailTelportable'))
  2417.             $this->setPhone2((string)$fiche->DetailTelportable);
  2418.         elseif (property_exists($fiche'TelPortable'))
  2419.             $this->setPhone2((string)$fiche->TelPortable);
  2420.         elseif (property_exists($fiche'CommMob'))
  2421.             $this->setPhone2((string)$fiche->CommMob);
  2422.         elseif (property_exists($fiche'CoordonneesTelmobile'))
  2423.             $this->setPhone2((string)$fiche->CoordonneesTelmobile);
  2424.         elseif (property_exists($fiche'TELMOB'))
  2425.             $this->setPhone2((string)$fiche->TELMOB);
  2426.         if (property_exists($fiche'Detailurl'))
  2427.             $this->setUrl((string)$fiche->Detailurl);
  2428.         elseif (property_exists($fiche'Url'))
  2429.             $this->setUrl((string)$fiche->Url);
  2430.         elseif (property_exists($fiche'CommWeb'))
  2431.             $this->setUrl((string)$fiche->CommWeb);
  2432.         elseif (property_exists($fiche'CoordonneesSiteweb'))
  2433.             $this->setUrl((string)$fiche->CoordonneesSiteweb);
  2434.         elseif (property_exists($fiche'URL'))
  2435.             $this->setUrl((string)$fiche->URL);
  2436.         if (property_exists($fiche'DetailDescriptifOT'))
  2437.             $this->setComment((string)$fiche->DetailDescriptifOT);
  2438.         elseif (property_exists($fiche'Descriptif'))
  2439.             $this->setComment((string)$fiche->Descriptif);
  2440.         elseif (property_exists($fiche'Description'))
  2441.             $this->setComment((string)$fiche->Description);
  2442.         elseif (property_exists($fiche'DESCRIPTIF'))
  2443.             $this->setComment((string)$fiche->DESCRIPTIF);
  2444.         if (property_exists($fiche'DescriptifSynthetique'))
  2445.             $this->setComment2((string)$fiche->DescriptifSynthetique);
  2446.         // On stocke les données brutes de la fiche dans commentaireInterne
  2447.         // Comme il peut y avoir des mises à jour successives avec différents champs
  2448.         // On merge les infos avec l'existant
  2449.         $testemp $this->getInternalComment();
  2450.         if (isset($testemp) && $testemp != null && $testemp != '') {
  2451.             $ficheorig json_decode($testemp);
  2452.             $this->setInternalComment(json_encode((object)array_merge((array)$ficheorig, (array)$fiche)));
  2453.         } else {
  2454.             $this->setInternalComment(json_encode($fiche)); // On stocke la donnée JSON en brut dans le commentaire
  2455.         }
  2456.         // DetailContact est trop long car il peut contenir plusieurs contacts
  2457.         // if (isset($fiche->DetailContact))
  2458.         //    $this->setProviderResponsibleName((string) $fiche->DetailContact);
  2459.         if (property_exists($fiche'DetailRaisonsociale'))
  2460.             $this->setProviderName((string)$fiche->DetailRaisonsociale);
  2461.         elseif (property_exists($fiche'Raisonsociale'))
  2462.             $this->setProviderName((string)$fiche->Raisonsociale);
  2463.         if (property_exists($fiche'DetailSiteweb'))
  2464.             $this->setProviderUrl((string)$fiche->DetailSiteweb);
  2465.         elseif (property_exists($fiche'Siteweb'))
  2466.             $this->setProviderUrl((string)$fiche->Siteweb);
  2467.         if (property_exists($fiche'ObjectTypeName'))
  2468.             $this->setTypeName((string)$fiche->ObjectTypeName);
  2469.         if (property_exists($fiche'Updated') && isset($fiche->Updated)) {
  2470.             $tmp substr($fiche->Updated019);
  2471.             $tmp str_replace('T'' '$tmp);
  2472.             $tmp date_create_from_format("Y-m-d H:i:s"$tmp);
  2473.             if ($tmp !== false)
  2474.                 $this->setUpdatedAt($tmp);
  2475.         }
  2476.         if (property_exists($fiche'DATEMAJDISPO') && isset($fiche->DATEMAJDISPO) && strlen($fiche->DATEMAJDISPO) == 10) {
  2477.             $tmp date_create_from_format("d/m/Y"$fiche->DATEMAJDISPO);
  2478.             if ($tmp !== false)
  2479.                 $this->setMaxUpdate($tmp);
  2480.         }
  2481.         $this->setMarking(MarkingCodesMask::TOURINSOFT);
  2482.     }
  2483.     public function getInternalComment(): ?string
  2484.     {
  2485.         return $this->internalComment;
  2486.     }
  2487.     public function setInternalComment(?string $internalComment): self
  2488.     {
  2489.         $this->internalComment $internalComment;
  2490.         return $this;
  2491.     }
  2492.     public function bindApidaeDatas($fiche$languages = array())
  2493.     {
  2494.         // http://wcf.tourinsoft.com/Syndication/cdt37/339e9b43-b094-4871-867a-18d8dbdb7b20/Objects('ACCCEN0370007P')?$format=json
  2495.         $this->setProductTextKey($fiche['identifier']);
  2496.         if (isset($fiche['nom']) && isset($fiche['nom']['libelleFr']))
  2497.             $this->setName((string)$fiche['nom']['libelleFr']);
  2498.         else
  2499.             return false;
  2500.         if (isset($fiche['id']))
  2501.             $this->setProductCode($fiche['id']);
  2502.         else
  2503.             return false;
  2504.         if (isset($fiche['gestion']) && isset($fiche['gestion']['dateCreation'])) {
  2505.             $tmp = (string)$fiche['gestion']['dateCreation'];
  2506.             $tmp date_create_from_format("Y-m-d\TH:i:s.uO"$tmp);
  2507.             if ($tmp !== false)
  2508.                 $this->setCreatedAt($tmp);
  2509.         }
  2510.         if (isset($fiche['gestion']) && isset($fiche['gestion']['dateModification'])) {
  2511.             $tmp = (string)$fiche['gestion']['dateModification'];
  2512.             // La date est à ce type de format : 2023-08-28T09:53:50.659+0000
  2513.             $tmp date_create_from_format("Y-m-d\TH:i:s.uO"$tmp);
  2514.             if ($tmp !== false)
  2515.                 $this->setUpdatedAt($tmp);
  2516.         }
  2517.         // Patch 10.07.2023 : on remet les champ à null pour prendre en compte les effacements côté apidae
  2518.         $this->setPhone(null);
  2519.         $this->setPhone2(null);
  2520.         $this->setPhone3(null);
  2521.         $this->setUrl(null);
  2522.         $this->setEmail(null);
  2523.         $this->setLocationName(null);
  2524.         $this->setAddress(null);
  2525.         $this->setStreetName(null);
  2526.         $this->setAdditionAddress(null);
  2527.         $this->setSpecialDistributionAddress(null);
  2528.         $this->setZipCode(null);
  2529.         $this->setCity(null);
  2530.         $this->setInsee(null);
  2531.         $this->setComment(null);
  2532.         // Patch 10/06/2022 : il peut y avoir des doublons dans ce code et il semble inutile
  2533.         // $this->setProductTextKey($fiche['identifier']);
  2534.         if (isset($fiche['informations']) && isset($fiche['informations']['moyensCommunication'])) {
  2535.             $nbPhone 0;
  2536.             foreach ($fiche['informations']['moyensCommunication'] as $moycomm) {
  2537.                 $typecomm '';
  2538.                 if (isset($moycomm['type']) && isset($moycomm['type']['id']) && isset($moycomm['coordonnees']) && isset($moycomm['coordonnees']['fr']))
  2539.                     $typecomm = (string)$moycomm['type']['id'];
  2540.                 if ($typecomm != '') {
  2541.                     switch ($typecomm) {
  2542.                         case "201"// TEL
  2543.                             if($nbPhone == 0)
  2544.                                 $this->setPhone($moycomm['coordonnees']['fr']);
  2545.                             elseif($nbPhone == 1)
  2546.                                 $this->setPhone2($moycomm['coordonnees']['fr']);
  2547.                             elseif($nbPhone == 2)
  2548.                                 $this->setPhone3($moycomm['coordonnees']['fr']);
  2549.                             $nbPhone++;
  2550.                             break;
  2551.                         case "204"// MAIL
  2552.                             $this->setEmail($moycomm['coordonnees']['fr']);
  2553.                             break;
  2554.                         case "205"// URL
  2555.                             $this->setUrl($moycomm['coordonnees']['fr']);
  2556.                             break;
  2557.                         default: // TEL
  2558.                             // TODO : intégrer les autres données en critère
  2559.                             // $this->setPhone($moycomm['coordonnees']['fr']);
  2560.                             break;
  2561.                     }
  2562.                 }
  2563.             }
  2564.         }
  2565.         if (isset($fiche['presentation']) && isset($fiche['presentation']['descriptifCourt']) && isset($fiche['presentation']['descriptifCourt']['libelleFr'])) {
  2566.             $this->setComment((string)$fiche['presentation']['descriptifCourt']['libelleFr']);
  2567.         }
  2568.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['nomDuLieu'])) {
  2569.             $this->setLocationName((string)$fiche['localisation']['adresse']['nomDuLieu']);
  2570.         } else {
  2571.             $this->setLocationName(null);
  2572.         }
  2573.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['adresse1'])) {
  2574.             $this->setAddress((string)$fiche['localisation']['adresse']['adresse1']);
  2575.             $this->setStreetName((string)$fiche['localisation']['adresse']['adresse1']);
  2576.         } else {
  2577.             $this->setStreetName(null);
  2578.         }
  2579.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['adresse2'])) {
  2580.             $this->setAdditionAddress((string)$fiche['localisation']['adresse']['adresse2']);
  2581.         } else {
  2582.             $this->setAdditionAddress(null);
  2583.         }
  2584.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['adresse3'])) {
  2585.             $this->setSpecialDistributionAddress((string)$fiche['localisation']['adresse']['adresse3']);
  2586.         } else {
  2587.             $this->setSpecialDistributionAddress(null);
  2588.         }
  2589.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['codePostal'])) {
  2590.             $this->setZipCode((string)$fiche['localisation']['adresse']['codePostal']);
  2591.         } else {
  2592.             $this->setZipCode(null);
  2593.         }
  2594.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['commune']) && isset($fiche['localisation']['adresse']['commune']['nom'])) {
  2595.             $this->setCity((string)$fiche['localisation']['adresse']['commune']['nom']);
  2596.         } else {
  2597.             $this->setCity(null);
  2598.         }
  2599.         if (isset($fiche['localisation']) && isset($fiche['localisation']['adresse']) && isset($fiche['localisation']['adresse']['commune']) && isset($fiche['localisation']['adresse']['commune']['code'])) {
  2600.             $this->setInsee((string)$fiche['localisation']['adresse']['commune']['code']);
  2601.         }
  2602.         if (isset($fiche['localisation']) && isset($fiche['localisation']['geolocalisation']) && isset($fiche['localisation']['geolocalisation']['geoJson']) && isset($fiche['localisation']['geolocalisation']['geoJson']['coordinates'])) {
  2603.             // echo "\nLATLON IS DEFINED";
  2604.             $longitude = ((double)$fiche['localisation']['geolocalisation']['geoJson']['coordinates'][0]);
  2605.             $latitude = ((double)$fiche['localisation']['geolocalisation']['geoJson']['coordinates'][1]);
  2606.             if (abs((float)$longitude) >= && abs((float)$longitude) <= 180 && abs((float)$latitude) >= && abs((float)$latitude) < 90) {
  2607.                 $this->setLongitude((double)$longitude);
  2608.                 $this->setLatitude((double)$latitude);
  2609.                 // Patch 08/08/19 : ajout du cast string
  2610.                 // Patch JM 03/02/2022 : les points sont en LON LAT et non pas LAT LON
  2611.                 // $point = new \LongitudeOne\Spatial\PHP\Types\Geometry\Point($this->getLongitude(), $this->getLatitude());
  2612.                 //$point->setSrid("4326");
  2613.                 // $this->setGeoPoint($point);
  2614.                 $this->setGeoPoint('SRID=4326;POINT(' $this->getLongitude() . ' ' $this->getLatitude() . ')');
  2615.             }
  2616.         }
  2617.         $this->setMarking(MarkingCodesMask::APIDAE);
  2618.     }
  2619.     public function __toString()
  2620.     {
  2621.         return $this->getName();
  2622.     }
  2623.     public function getName(): ?string
  2624.     {
  2625.         return $this->name;
  2626.     }
  2627.     public function setName(?string $name): self
  2628.     {
  2629.         $this->name $name;
  2630.         return $this;
  2631.     }
  2632.     public function getSlug(): ?string
  2633.     {
  2634.         return $this->slug;
  2635.     }
  2636.     public function setSlug(?string $slug): self
  2637.     {
  2638.         $this->slug $slug;
  2639.         return $this;
  2640.     }
  2641.     public function getProviderTextKey(): ?string
  2642.     {
  2643.         return $this->providerTextKey;
  2644.     }
  2645.     public function setProviderTextKey(?string $key): self
  2646.     {
  2647.         $this->providerTextKey $key;
  2648.         return $this;
  2649.     }
  2650.     /**
  2651.      * @return Collection|DnsitProductDispo[]
  2652.      */
  2653.     public function getDispos(): Collection
  2654.     {
  2655.         return $this->dispos;
  2656.     }
  2657.     public function addDispo(DnsitProductDispo $dispo): self
  2658.     {
  2659.         if (!$this->dispos->contains($dispo)) {
  2660.             $this->dispos[] = $dispo;
  2661.             $dispo->setProduct($this);
  2662.         }
  2663.         return $this;
  2664.     }
  2665.     public function removeDispo(DnsitProductDispo $dispo): self
  2666.     {
  2667.         if ($this->dispos->contains($dispo)) {
  2668.             $this->dispos->removeElement($dispo);
  2669.             // set the owning side to null (unless already changed)
  2670.             if ($dispo->getProduct() === $this) {
  2671.                 $dispo->setProduct(null);
  2672.             }
  2673.         }
  2674.         return $this;
  2675.     }
  2676.     /**
  2677.      * @return Collection|WebFilterResult[]
  2678.      */
  2679.     public function getWebFilterResults(): Collection
  2680.     {
  2681.         return $this->webFilterResults;
  2682.     }
  2683.     public function addWebFilterResult(WebFilterResult $webFilterResult): self
  2684.     {
  2685.         if (!$this->webFilterResults->contains($webFilterResult)) {
  2686.             $this->webFilterResults[] = $webFilterResult;
  2687.             $webFilterResult->setProduct($this);
  2688.         }
  2689.         return $this;
  2690.     }
  2691.     public function removeWebFilterResult(WebFilterResult $webFilterResult): self
  2692.     {
  2693.         if ($this->webFilterResults->contains($webFilterResult)) {
  2694.             $this->webFilterResults->removeElement($webFilterResult);
  2695.             // set the owning side to null (unless already changed)
  2696.             if ($webFilterResult->getProduct() === $this) {
  2697.                 $webFilterResult->setProduct(null);
  2698.             }
  2699.         }
  2700.         return $this;
  2701.     }
  2702.     /**
  2703.      * @return Collection|GuideAccueilDestinataire[]
  2704.      */
  2705.     public function getGuidesAccueil(): Collection
  2706.     {
  2707.         return $this->guidesAccueil;
  2708.     }
  2709.     public function addGuideAccueil(GuideAccueilDestinataire $guideAccueil): self
  2710.     {
  2711.         if (!$this->guidesAccueil->contains($guideAccueil)) {
  2712.             $this->guidesAccueil[] = $guideAccueil;
  2713.             $guideAccueil->setProduct($this);
  2714.         }
  2715.         return $this;
  2716.     }
  2717.     public function removeGuideAccueil(GuideAccueilDestinataire $guideAccueil): self
  2718.     {
  2719.         if ($this->guidesAccueil->contains($guideAccueil)) {
  2720.             $this->guidesAccueil->removeElement($guideAccueil);
  2721.             // set the owning side to null (unless already changed)
  2722.             if ($guideAccueil->getProduct() === $this) {
  2723.                 $guideAccueil->setProduct(null);
  2724.             }
  2725.         }
  2726.         return $this;
  2727.     }
  2728.     private function geoPhpObjectToLineStringArray($geoPhpObject) {
  2729.         // on s'assure qu'il s'agisse d'un élément simple
  2730.         $simpleLineStringKML \geoPHP::geometryReduce($geoPhpObject);
  2731.         $lineStringArray = array();
  2732.         if ($simpleLineStringKML !== false is_object($simpleLineStringKML)) {
  2733.             // On s'attend à avoir une LineString mais il ya des fois des anomalies, on vérifie donc le type
  2734.             $dataType get_class($simpleLineStringKML);
  2735.             // Doctrine Spatial a besoin d'un tableau de points en 2D seulement et les KML peuvent être en 3D
  2736.             // Il faut aussi des types \LongitudeOne\Spatial\PHP\Types\Geometry\Point et non des types geoPHP\Point
  2737.             // on récupère donc un tableau des composants de la géométrie
  2738.             $lineStringKMLPoints $simpleLineStringKML->getComponents();
  2739.             if (is_array($lineStringKMLPoints) && count($lineStringKMLPoints) > 0) {
  2740.                 // si la géométrie est bien une LineString...
  2741.                 if ($dataType == 'LineString') {
  2742.                     foreach ($lineStringKMLPoints as $geoPhpPoint) {
  2743.                         if (is_array($geoPhpPoint->coords) && count($geoPhpPoint->coords) >= 2) {
  2744.                             // on boucle sur ses points
  2745.                             $lineStringArray[] = $geoPhpPoint->coords[0] . ' ' $geoPhpPoint->coords[1] ;
  2746.                         }
  2747.                     }
  2748.                 } else {
  2749.                     // 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
  2750.                     foreach ($lineStringKMLPoints as $lineString) {
  2751.                         // On test si $lineString est bien un Point
  2752.                         if (is_object($lineString) && get_class($lineString) == 'Point') {
  2753.                             $lineStringPoints = [$lineString];
  2754.                         } else {
  2755.                             // on boucle sur les points de la LineString
  2756.                             $lineStringPoints $lineString->getComponents();
  2757.                         }
  2758.                         if (is_array($lineStringPoints) && count($lineStringPoints) > 0) {
  2759.                             foreach ($lineStringPoints as $geoPhpPoint) {
  2760.                                 if (is_array($geoPhpPoint->coords) && count($geoPhpPoint->coords) >= 2) {
  2761.                                     // $creofPoint = new \LongitudeOne\Spatial\PHP\Types\Geometry\Point($geoPhpPoint->coords[0], $geoPhpPoint->coords[1]);
  2762.                                     // $creofPoint->setSrid("4326");
  2763.                                     // $lineStringArray[] = $creofPoint;
  2764.                                     $lineStringArray[] = $geoPhpPoint->coords[0] . ' ' $geoPhpPoint->coords[1] ;
  2765.                                 }
  2766.                             }
  2767.                         }
  2768.                     }
  2769.                 }
  2770.             }
  2771.         }
  2772.         return $lineStringArray;
  2773.     }
  2774. }