vendor/theatre/core/src/Entity/Persons.php line 14

Open in your IDE?
  1. <?php
  2. namespace TheatreCore\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * Persons
  7.  *
  8.  * @ORM\Table(name="persons", uniqueConstraints={@ORM\UniqueConstraint(name="url_clean", columns={"url_clean"})}, indexes={@ORM\Index(name="valid", columns={"valid"}), @ORM\Index(name="url_redirect", columns={"url_redirect"}), @ORM\Index(name="lastname", columns={"lastname"}), @ORM\Index(name="country", columns={"country"}), @ORM\Index(name="idextranetuser", columns={"idextranetuser"}), @ORM\Index(name="firstname", columns={"firstname"}), @ORM\Index(name="idrole", columns={"idrole"}), @ORM\Index(name="ccountry", columns={"ccountry"})})
  9.  * @ORM\Entity(repositoryClass="TheatreCore\Repository\PersonsRepository")
  10.  */
  11. class Persons
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="idperson", type="integer", nullable=false, options={"unsigned"=true})
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      *
  20.      */
  21.     private $idperson;
  22.     /**
  23.      * @var string|null
  24.      *
  25.      * @ORM\Column(name="lastname", type="string", length=255, nullable=true)
  26.      *
  27.      *
  28.      * @Assert\NotBlank(message="Veuillez prĂ©ciser le nom")
  29.      * @Assert\Length(
  30.      *      min = 2,
  31.      *      max = 50,
  32.      *      minMessage = "Your first name must be at least {{ limit }} characters long",
  33.      *      maxMessage = "Your first name cannot be longer than {{ limit }} characters"
  34.      * )
  35.      *
  36.      */
  37.     private $lastname;
  38.     /**
  39.      * @var string|null
  40.      *
  41.      * @ORM\Column(name="firstname", type="string", length=255, nullable=true)
  42.      */
  43.     private $firstname;
  44.     /**
  45.      * @var int
  46.      *
  47.      * @ORM\Column(name="sexe", type="smallint", nullable=false)
  48.      *
  49.      * @Assert\NotBlank(message="Veuillez prĂ©ciser le sexe")
  50.      *
  51.      */
  52.     private $sexe;
  53.     /**
  54.      * @var int|null
  55.      *
  56.      * @ORM\Column(name="datestart", type="smallint", nullable=true)
  57.      */
  58.     private $datestart;
  59.     /**
  60.      * @var int|null
  61.      *
  62.      * @ORM\Column(name="dateend", type="smallint", nullable=true)
  63.      */
  64.     private $dateend;
  65.     /**
  66.      * @var string|null
  67.      *
  68.      * @ORM\Column(name="language", type="string", length=2, nullable=true)
  69.      */
  70.     private $language;
  71.     /**
  72.      * @var string|null
  73.      *
  74.      * @ORM\Column(name="language2", type="string", length=2, nullable=true)
  75.      */
  76.     private $language2;
  77.     /**
  78.      * @var string|null
  79.      *
  80.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  81.      */
  82.     private $email;
  83.     /**
  84.      * @var string|null
  85.      *
  86.      * @ORM\Column(name="comment", type="text", length=65535, nullable=true)
  87.      */
  88.     private $comment;
  89.     /**
  90.      * @var string|null
  91.      *
  92.      * @ORM\Column(name="cname", type="string", length=255, nullable=true)
  93.      */
  94.     private $cname;
  95.     /**
  96.      * @var string|null
  97.      *
  98.      * @ORM\Column(name="caddress", type="text", length=65535, nullable=true)
  99.      */
  100.     private $caddress;
  101.     /**
  102.      * @var string|null
  103.      *
  104.      * @ORM\Column(name="czip", type="string", length=100, nullable=true)
  105.      */
  106.     private $czip;
  107.     /**
  108.      * @var string|null
  109.      *
  110.      * @ORM\Column(name="ccity", type="string", length=100, nullable=true)
  111.      */
  112.     private $ccity;
  113.     /**
  114.      * @var string|null
  115.      *
  116.      * @ORM\Column(name="ccountry", type="string", length=2, nullable=true, options={"fixed"=true})
  117.      */
  118.     private $ccountry;
  119.     /**
  120.      * @var string|null
  121.      *
  122.      * @ORM\Column(name="cphone", type="string", length=100, nullable=true)
  123.      */
  124.     private $cphone;
  125.     /**
  126.      * @var string|null
  127.      *
  128.      * @ORM\Column(name="cfax", type="string", length=100, nullable=true)
  129.      */
  130.     private $cfax;
  131.     /**
  132.      * @var string|null
  133.      *
  134.      * @ORM\Column(name="cemail", type="string", length=255, nullable=true)
  135.      */
  136.     private $cemail;
  137.     /**
  138.      * @var string|null
  139.      *
  140.      * @ORM\Column(name="cmobile", type="string", length=50, nullable=true)
  141.      */
  142.     private $cmobile;
  143.     /**
  144.      * @var string|null
  145.      *
  146.      * @ORM\Column(name="url_redirect", type="string", length=250, nullable=true)
  147.      */
  148.     private $urlRedirect;
  149.     /**
  150.      * @var string
  151.      *
  152.      * @ORM\Column(name="url_clean", type="string", length=250, nullable=false)
  153.      */
  154.     private $urlClean;
  155.     /**
  156.      * @var string|null
  157.      *
  158.      * @ORM\Column(name="url_mav", type="string", length=250, nullable=true)
  159.      */
  160.     private $urlMav;
  161.     /**
  162.      * @var \DateTime|null
  163.      *
  164.      * @ORM\Column(name="dateupdate", type="datetime", nullable=true)
  165.      */
  166.     private $dateupdate;
  167.     /**
  168.      * @var \DateTime|null
  169.      *
  170.      * @ORM\Column(name="dateinsert", type="datetime", nullable=true)
  171.      */
  172.     private $dateinsert;
  173.     /**
  174.      * @var bool
  175.      *
  176.      * @ORM\Column(name="publish", type="boolean", nullable=false, options={"default"="1"})
  177.      */
  178.     private $publish true;
  179.     /**
  180.      * @var bool
  181.      *
  182.      * @ORM\Column(name="valid", type="boolean", nullable=false)
  183.      */
  184.     private $valid false;
  185.     /**
  186.      * @var \Countries
  187.      *
  188.      * @ORM\ManyToOne(targetEntity="Countries")
  189.      * @ORM\JoinColumns({
  190.      *   @ORM\JoinColumn(name="country", referencedColumnName="id")
  191.      * })
  192.      */
  193.     private $country;
  194.     /**
  195.      * @var \Roles
  196.      *
  197.      * @ORM\ManyToOne(targetEntity="Roles")
  198.      * @ORM\JoinColumns({
  199.      *   @ORM\JoinColumn(name="idrole", referencedColumnName="idrole")
  200.      * })
  201.      */
  202.     private $idrole;
  203.     /**
  204.      * @var \Extranetusers
  205.      *
  206.      * @ORM\ManyToOne(targetEntity="Extranetusers")
  207.      * @ORM\JoinColumns({
  208.      *   @ORM\JoinColumn(name="idextranetuser", referencedColumnName="idextranetuser")
  209.      * })
  210.      */
  211.     private $idextranetuser;
  212.     /**
  213.      * @var \Doctrine\Common\Collections\Collection
  214.      *
  215.      * @ORM\ManyToMany(targetEntity="News", mappedBy="idperson")
  216.      */
  217.     private $idnew;
  218.     /**
  219.      * @var \Doctrine\Common\Collections\Collection
  220.      *
  221.      * @ORM\ManyToMany(targetEntity="Classifications", inversedBy="idperson")
  222.      * @ORM\JoinTable(name="person_classification",
  223.      *   joinColumns={
  224.      *     @ORM\JoinColumn(name="idperson", referencedColumnName="idperson")
  225.      *   },
  226.      *   inverseJoinColumns={
  227.      *     @ORM\JoinColumn(name="idclassification", referencedColumnName="idclassification")
  228.      *   }
  229.      * )
  230.      *
  231.      */
  232.     private $person_classification;
  233.     /**
  234.      * @var \Doctrine\Common\Collections\Collection
  235.      *
  236.      * @ORM\ManyToMany(targetEntity="Contacts", inversedBy="idperson")
  237.      * @ORM\JoinTable(name="person_ecole",
  238.      *   joinColumns={
  239.      *     @ORM\JoinColumn(name="idperson", referencedColumnName="idperson")
  240.      *   },
  241.      *   inverseJoinColumns={
  242.      *     @ORM\JoinColumn(name="idcontact", referencedColumnName="idcontact")
  243.      *   }
  244.      * )
  245.      */
  246.     private $idcontact;
  247.     /**
  248.      * @var \Doctrine\Common\Collections\Collection
  249.      *
  250.      * @ORM\ManyToMany(targetEntity="Extranetusers", inversedBy="idperson")
  251.      * @ORM\JoinTable(name="person_extranetuser",
  252.      *   joinColumns={
  253.      *     @ORM\JoinColumn(name="idperson", referencedColumnName="idperson")
  254.      *   },
  255.      *   inverseJoinColumns={
  256.      *     @ORM\JoinColumn(name="idextranetuser", referencedColumnName="idextranetuser")
  257.      *   }
  258.      * )
  259.      */
  260.     private $personextranetuser;
  261.     /**
  262.      * @var \Doctrine\Common\Collections\Collection
  263.      *
  264.      * @ORM\ManyToMany(targetEntity="Podcasts", mappedBy="idperson")
  265.      */
  266.     private $idpodcast;
  267.     /**
  268.      * @var \Doctrine\Common\Collections\Collection
  269.      *
  270.      * @ORM\ManyToMany(targetEntity="Spectacles", mappedBy="idperson")
  271.      */
  272.     private $idspectacle;
  273.     /**
  274.      * @var \Doctrine\Common\Collections\Collection
  275.      *
  276.      * @ORM\ManyToMany(targetEntity="Texts", mappedBy="text_author")
  277.      */
  278.     private $textAuthortext;
  279.     /**
  280.      * @var \Doctrine\Common\Collections\Collection
  281.      *
  282.      * @ORM\ManyToMany(targetEntity="Texts", mappedBy="textTranslator")
  283.      */
  284.     private $textTranslatortext;
  285.     /**
  286.      * @var \Doctrine\Common\Collections\Collection
  287.      *
  288.      * @ORM\ManyToMany(targetEntity="Texts", mappedBy="text_person")
  289.      */
  290.     private $textPersontext;
  291.     /**
  292.      * @var int
  293.      *
  294.      * @ORM\Column(name="idcorvin", type="integer", nullable=true, options={"unsigned"=true})
  295.      *
  296.      */
  297.     private ?int $idcorvin;
  298.     /**
  299.      * Constructor
  300.      */
  301.     public function __construct()
  302.     {
  303.         $this->idnew = new \Doctrine\Common\Collections\ArrayCollection();
  304.         $this->idclassification = new \Doctrine\Common\Collections\ArrayCollection();
  305.         $this->idcontact = new \Doctrine\Common\Collections\ArrayCollection();
  306.         $this->personextranetuser = new \Doctrine\Common\Collections\ArrayCollection();
  307.         $this->idpodcast = new \Doctrine\Common\Collections\ArrayCollection();
  308.         $this->idspectacle = new \Doctrine\Common\Collections\ArrayCollection();
  309.         $this->textAuthortext = new \Doctrine\Common\Collections\ArrayCollection();
  310.         $this->textTranslatortext = new \Doctrine\Common\Collections\ArrayCollection();
  311.         $this->textPerson = new \Doctrine\Common\Collections\ArrayCollection();
  312.     }
  313.     /**
  314.      * Get idperson.
  315.      *
  316.      * @return int
  317.      */
  318.     public function getIdperson()
  319.     {
  320.         return $this->idperson;
  321.     }
  322.     /**
  323.      * @return int
  324.      */
  325.     public function getIdCorvin(): ?int
  326.     {
  327.         return $this->idcorvin;
  328.     }
  329.     public function setIdCorvin(?int $idcorvin): self
  330.     {
  331.         $this->idcorvin $idcorvin;
  332.         return $this;
  333.     }
  334.     /**
  335.      * Set lastname.
  336.      *
  337.      * @param string|null $lastname
  338.      *
  339.      * @return Persons
  340.      */
  341.     public function setLastname($lastname null)
  342.     {
  343.         $this->lastname $lastname;
  344.         return $this;
  345.     }
  346.     /**
  347.      * Get lastname.
  348.      *
  349.      * @return string|null
  350.      */
  351.     public function getLastname()
  352.     {
  353.         return $this->lastname;
  354.     }
  355.     /**
  356.      * Set firstname.
  357.      *
  358.      * @param string|null $firstname
  359.      *
  360.      * @return Persons
  361.      */
  362.     public function setFirstname($firstname null)
  363.     {
  364.         $this->firstname $firstname;
  365.         return $this;
  366.     }
  367.     /**
  368.      * Get firstname.
  369.      *
  370.      * @return string|null
  371.      */
  372.     public function getFirstname()
  373.     {
  374.         return $this->firstname;
  375.     }
  376.     /**
  377.      * Set sexe.
  378.      *
  379.      * @param int $sexe
  380.      *
  381.      * @return Persons
  382.      */
  383.     public function setSexe($sexe)
  384.     {
  385.         $this->sexe $sexe;
  386.         return $this;
  387.     }
  388.     /**
  389.      * Get sexe.
  390.      *
  391.      * @return int
  392.      */
  393.     public function getSexe()
  394.     {
  395.         return $this->sexe;
  396.     }
  397.     /**
  398.      * Set datestart.
  399.      *
  400.      * @param int|null $datestart
  401.      *
  402.      * @return Persons
  403.      */
  404.     public function setDatestart($datestart null)
  405.     {
  406.         $this->datestart $datestart;
  407.         return $this;
  408.     }
  409.     /**
  410.      * Get datestart.
  411.      *
  412.      * @return int|null
  413.      */
  414.     public function getDatestart()
  415.     {
  416.         return $this->datestart;
  417.     }
  418.     /**
  419.      * Set dateend.
  420.      *
  421.      * @param int|null $dateend
  422.      *
  423.      * @return Persons
  424.      */
  425.     public function setDateend($dateend null)
  426.     {
  427.         $this->dateend $dateend;
  428.         return $this;
  429.     }
  430.     /**
  431.      * Get dateend.
  432.      *
  433.      * @return int|null
  434.      */
  435.     public function getDateend()
  436.     {
  437.         return $this->dateend;
  438.     }
  439.     /**
  440.      * Set language.
  441.      *
  442.      * @param string|null $language
  443.      *
  444.      * @return Persons
  445.      */
  446.     public function setLanguage($language null)
  447.     {
  448.         $this->language $language;
  449.         return $this;
  450.     }
  451.     /**
  452.      * Get language.
  453.      *
  454.      * @return string|null
  455.      */
  456.     public function getLanguage()
  457.     {
  458.         return $this->language;
  459.     }
  460.     /**
  461.      * Set language2.
  462.      *
  463.      * @param string|null $language2
  464.      *
  465.      * @return Persons
  466.      */
  467.     public function setLanguage2($language2 null)
  468.     {
  469.         $this->language2 $language2;
  470.         return $this;
  471.     }
  472.     /**
  473.      * Get language2.
  474.      *
  475.      * @return string|null
  476.      */
  477.     public function getLanguage2()
  478.     {
  479.         return $this->language2;
  480.     }
  481.     /**
  482.      * Set email.
  483.      *
  484.      * @param string|null $email
  485.      *
  486.      * @return Persons
  487.      */
  488.     public function setEmail($email null)
  489.     {
  490.         $this->email $email;
  491.         return $this;
  492.     }
  493.     /**
  494.      * Get email.
  495.      *
  496.      * @return string|null
  497.      */
  498.     public function getEmail()
  499.     {
  500.         return $this->email;
  501.     }
  502.     /**
  503.      * Set comment.
  504.      *
  505.      * @param string|null $comment
  506.      *
  507.      * @return Persons
  508.      */
  509.     public function setComment($comment null)
  510.     {
  511.         $this->comment $comment;
  512.         return $this;
  513.     }
  514.     /**
  515.      * Get comment.
  516.      *
  517.      * @return string|null
  518.      */
  519.     public function getComment()
  520.     {
  521.         return $this->comment;
  522.     }
  523.     /**
  524.      * Set cname.
  525.      *
  526.      * @param string|null $cname
  527.      *
  528.      * @return Persons
  529.      */
  530.     public function setCname($cname null)
  531.     {
  532.         $this->cname $cname;
  533.         return $this;
  534.     }
  535.     /**
  536.      * Get cname.
  537.      *
  538.      * @return string|null
  539.      */
  540.     public function getCname()
  541.     {
  542.         return $this->cname;
  543.     }
  544.     /**
  545.      * Set caddress.
  546.      *
  547.      * @param string|null $caddress
  548.      *
  549.      * @return Persons
  550.      */
  551.     public function setCaddress($caddress null)
  552.     {
  553.         $this->caddress $caddress;
  554.         return $this;
  555.     }
  556.     /**
  557.      * Get caddress.
  558.      *
  559.      * @return string|null
  560.      */
  561.     public function getCaddress()
  562.     {
  563.         return $this->caddress;
  564.     }
  565.     /**
  566.      * Set czip.
  567.      *
  568.      * @param string|null $czip
  569.      *
  570.      * @return Persons
  571.      */
  572.     public function setCzip($czip null)
  573.     {
  574.         $this->czip $czip;
  575.         return $this;
  576.     }
  577.     /**
  578.      * Get czip.
  579.      *
  580.      * @return string|null
  581.      */
  582.     public function getCzip()
  583.     {
  584.         return $this->czip;
  585.     }
  586.     /**
  587.      * Set ccity.
  588.      *
  589.      * @param string|null $ccity
  590.      *
  591.      * @return Persons
  592.      */
  593.     public function setCcity($ccity null)
  594.     {
  595.         $this->ccity $ccity;
  596.         return $this;
  597.     }
  598.     /**
  599.      * Get ccity.
  600.      *
  601.      * @return string|null
  602.      */
  603.     public function getCcity()
  604.     {
  605.         return $this->ccity;
  606.     }
  607.     /**
  608.      * Set ccountry.
  609.      *
  610.      * @param string|null $ccountry
  611.      *
  612.      * @return Persons
  613.      */
  614.     public function setCcountry($ccountry null)
  615.     {
  616.         $this->ccountry $ccountry;
  617.         return $this;
  618.     }
  619.     /**
  620.      * Get ccountry.
  621.      *
  622.      * @return string|null
  623.      */
  624.     public function getCcountry()
  625.     {
  626.         return $this->ccountry;
  627.     }
  628.     /**
  629.      * Set cphone.
  630.      *
  631.      * @param string|null $cphone
  632.      *
  633.      * @return Persons
  634.      */
  635.     public function setCphone($cphone null)
  636.     {
  637.         $this->cphone $cphone;
  638.         return $this;
  639.     }
  640.     /**
  641.      * Get cphone.
  642.      *
  643.      * @return string|null
  644.      */
  645.     public function getCphone()
  646.     {
  647.         return $this->cphone;
  648.     }
  649.     /**
  650.      * Set cfax.
  651.      *
  652.      * @param string|null $cfax
  653.      *
  654.      * @return Persons
  655.      */
  656.     public function setCfax($cfax null)
  657.     {
  658.         $this->cfax $cfax;
  659.         return $this;
  660.     }
  661.     /**
  662.      * Get cfax.
  663.      *
  664.      * @return string|null
  665.      */
  666.     public function getCfax()
  667.     {
  668.         return $this->cfax;
  669.     }
  670.     /**
  671.      * Set cemail.
  672.      *
  673.      * @param string|null $cemail
  674.      *
  675.      * @return Persons
  676.      */
  677.     public function setCemail($cemail null)
  678.     {
  679.         $this->cemail $cemail;
  680.         return $this;
  681.     }
  682.     /**
  683.      * Get cemail.
  684.      *
  685.      * @return string|null
  686.      */
  687.     public function getCemail()
  688.     {
  689.         return $this->cemail;
  690.     }
  691.     /**
  692.      * Set cmobile.
  693.      *
  694.      * @param string|null $cmobile
  695.      *
  696.      * @return Persons
  697.      */
  698.     public function setCmobile($cmobile null)
  699.     {
  700.         $this->cmobile $cmobile;
  701.         return $this;
  702.     }
  703.     /**
  704.      * Get cmobile.
  705.      *
  706.      * @return string|null
  707.      */
  708.     public function getCmobile()
  709.     {
  710.         return $this->cmobile;
  711.     }
  712.     /**
  713.      * Set urlRedirect.
  714.      *
  715.      * @param string|null $urlRedirect
  716.      *
  717.      * @return Persons
  718.      */
  719.     public function setUrlRedirect($urlRedirect null)
  720.     {
  721.         $this->urlRedirect $urlRedirect;
  722.         return $this;
  723.     }
  724.     /**
  725.      * Get urlRedirect.
  726.      *
  727.      * @return string|null
  728.      */
  729.     public function getUrlRedirect()
  730.     {
  731.         return $this->urlRedirect;
  732.     }
  733.     /**
  734.      * Set urlClean.
  735.      *
  736.      * @param string $urlClean
  737.      *
  738.      * @return Persons
  739.      */
  740.     public function setUrlClean($urlClean)
  741.     {
  742.         $this->urlClean $urlClean;
  743.         return $this;
  744.     }
  745.     /**
  746.      * Get urlClean.
  747.      *
  748.      * @return string
  749.      */
  750.     public function getUrlClean()
  751.     {
  752.         return $this->urlClean;
  753.     }
  754.     /**
  755.      * Set urlMav.
  756.      *
  757.      * @param string|null $urlMav
  758.      *
  759.      * @return Persons
  760.      */
  761.     public function setUrlMav($urlMav null)
  762.     {
  763.         $this->urlMav $urlMav;
  764.         return $this;
  765.     }
  766.     /**
  767.      * Get urlMav.
  768.      *
  769.      * @return string|null
  770.      */
  771.     public function getUrlMav()
  772.     {
  773.         return $this->urlMav;
  774.     }
  775.     /**
  776.      * Set dateupdate.
  777.      *
  778.      * @param \DateTime|null $dateupdate
  779.      *
  780.      * @return Persons
  781.      */
  782.     public function setDateupdate($dateupdate null)
  783.     {
  784.         $this->dateupdate $dateupdate;
  785.         return $this;
  786.     }
  787.     /**
  788.      * Get dateupdate.
  789.      *
  790.      * @return \DateTime|null
  791.      */
  792.     public function getDateupdate()
  793.     {
  794.         return $this->dateupdate;
  795.     }
  796.     /**
  797.      * Set dateinsert.
  798.      *
  799.      * @param \DateTime|null $dateinsert
  800.      *
  801.      * @return Persons
  802.      */
  803.     public function setDateinsert($dateinsert null)
  804.     {
  805.         $this->dateinsert $dateinsert;
  806.         return $this;
  807.     }
  808.     /**
  809.      * Get dateinsert.
  810.      *
  811.      * @return \DateTime|null
  812.      */
  813.     public function getDateinsert()
  814.     {
  815.         return $this->dateinsert;
  816.     }
  817.     /**
  818.      * Set publish.
  819.      *
  820.      * @param bool $publish
  821.      *
  822.      * @return Persons
  823.      */
  824.     public function setPublish($publish)
  825.     {
  826.         $this->publish $publish;
  827.         return $this;
  828.     }
  829.     /**
  830.      * Get publish.
  831.      *
  832.      * @return bool
  833.      */
  834.     public function getPublish()
  835.     {
  836.         return $this->publish;
  837.     }
  838.     /**
  839.      * Set valid.
  840.      *
  841.      * @param bool $valid
  842.      *
  843.      * @return Persons
  844.      */
  845.     public function setValid($valid)
  846.     {
  847.         $this->valid $valid;
  848.         return $this;
  849.     }
  850.     /**
  851.      * Get valid.
  852.      *
  853.      * @return bool
  854.      */
  855.     public function getValid()
  856.     {
  857.         return $this->valid;
  858.     }
  859.     /**
  860.      * Set country.
  861.      *
  862.      * @param \Countries|null $country
  863.      *
  864.      * @return Persons
  865.      */
  866.     public function setCountry(Countries $country null)
  867.     {
  868.         $this->country $country;
  869.         return $this;
  870.     }
  871.     /**
  872.      * Get country.
  873.      *
  874.      * @return \Countries|null
  875.      */
  876.     public function getCountry()
  877.     {
  878.         return $this->country;
  879.     }
  880.     /**
  881.      * Set idrole.
  882.      *
  883.      * @param \Roles|null $idrole
  884.      *
  885.      * @return Persons
  886.      */
  887.     public function setIdrole(Roles $idrole null)
  888.     {
  889.         $this->idrole $idrole;
  890.         return $this;
  891.     }
  892.     /**
  893.      * Get idrole.
  894.      *
  895.      * @return \Roles|null
  896.      */
  897.     public function getIdrole()
  898.     {
  899.         return $this->idrole;
  900.     }
  901.     /**
  902.      * Set idextranetuser.
  903.      *
  904.      * @param \Extranetusers|null $idextranetuser
  905.      *
  906.      * @return Persons
  907.      */
  908.     public function setIdextranetuser(Extranetusers $idextranetuser null)
  909.     {
  910.         $this->idextranetuser $idextranetuser;
  911.         return $this;
  912.     }
  913.     /**
  914.      * Get idextranetuser.
  915.      *
  916.      * @return \Extranetusers|null
  917.      */
  918.     public function getIdextranetuser()
  919.     {
  920.         return $this->idextranetuser;
  921.     }
  922.     /**
  923.      * Add idnew.
  924.      *
  925.      * @param \News $idnew
  926.      *
  927.      * @return Persons
  928.      */
  929.     public function addIdnew(News $idnew)
  930.     {
  931.         $this->idnew[] = $idnew;
  932.         return $this;
  933.     }
  934.     /**
  935.      * Remove idnew.
  936.      *
  937.      * @param \News $idnew
  938.      *
  939.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  940.      */
  941.     public function removeIdnew(News $idnew)
  942.     {
  943.         return $this->idnew->removeElement($idnew);
  944.     }
  945.     /**
  946.      * Get idnew.
  947.      *
  948.      * @return \Doctrine\Common\Collections\Collection
  949.      */
  950.     public function getIdnew()
  951.     {
  952.         return $this->idnew;
  953.     }
  954.     /**
  955.      * Add person_classification.
  956.      *
  957.      * @param \Classifications $person_classification
  958.      *
  959.      * @return Persons
  960.      */
  961.     public function addPersonClassification(Classifications $person_classification)
  962.     {
  963.         $this->person_classification[] = $person_classification;
  964.         return $this;
  965.     }
  966.     /**
  967.      * Remove person_classification.
  968.      *
  969.      * @param \Classifications $person_classification
  970.      *
  971.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  972.      */
  973.     public function remmovePersonClassification(Classifications $person_classification)
  974.     {
  975.         return $this->person_classification->removeElement($person_classification);
  976.     }
  977.     /**
  978.      * Get person_classification.
  979.      *
  980.      * @return \Doctrine\Common\Collections\Collection
  981.      */
  982.     public function getPersonClassification()
  983.     {
  984.         return $this->person_classification;
  985.     }
  986.     /**
  987.      * Add idcontact.
  988.      *
  989.      * @param \Contacts $idcontact
  990.      *
  991.      * @return Persons
  992.      */
  993.     public function addIdcontact(Contacts $idcontact)
  994.     {
  995.         $this->idcontact[] = $idcontact;
  996.         return $this;
  997.     }
  998.     /**
  999.      * Remove idcontact.
  1000.      *
  1001.      * @param \Contacts $idcontact
  1002.      *
  1003.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  1004.      */
  1005.     public function removeIdcontact(Contacts $idcontact)
  1006.     {
  1007.         return $this->idcontact->removeElement($idcontact);
  1008.     }
  1009.     /**
  1010.      * Get idcontact.
  1011.      *
  1012.      * @return \Doctrine\Common\Collections\Collection
  1013.      */
  1014.     public function getIdcontact()
  1015.     {
  1016.         return $this->idcontact;
  1017.     }
  1018.     /**
  1019.      * Add personextranetuser.
  1020.      *
  1021.      * @param \Extranetusers $personextranetuser
  1022.      *
  1023.      * @return Persons
  1024.      */
  1025.     public function addPersonextranetuser(Extranetusers $personextranetuser)
  1026.     {
  1027.         $this->personextranetuser[] = $personextranetuser;
  1028.         return $this;
  1029.     }
  1030.     /**
  1031.      * Remove personextranetuser.
  1032.      *
  1033.      * @param \Extranetusers $personextranetuser
  1034.      *
  1035.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  1036.      */
  1037.     public function removePersonextranetuser(Extranetusers $personextranetuser)
  1038.     {
  1039.         return $this->personextranetuser->removeElement($personextranetuser);
  1040.     }
  1041.     /**
  1042.      * Get personextranetuser.
  1043.      *
  1044.      * @return \Doctrine\Common\Collections\Collection
  1045.      */
  1046.     public function getPersonextranetuser()
  1047.     {
  1048.         return $this->personextranetuser;
  1049.     }
  1050.     /**
  1051.      * Add idpodcast.
  1052.      *
  1053.      * @param \Podcasts $idpodcast
  1054.      *
  1055.      * @return Persons
  1056.      */
  1057.     public function addIdpodcast(Podcasts $idpodcast)
  1058.     {
  1059.         $this->idpodcast[] = $idpodcast;
  1060.         return $this;
  1061.     }
  1062.     /**
  1063.      * Remove idpodcast.
  1064.      *
  1065.      * @param \Podcasts $idpodcast
  1066.      *
  1067.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  1068.      */
  1069.     public function removeIdpodcast(Podcasts $idpodcast)
  1070.     {
  1071.         return $this->idpodcast->removeElement($idpodcast);
  1072.     }
  1073.     /**
  1074.      * Get idpodcast.
  1075.      *
  1076.      * @return \Doctrine\Common\Collections\Collection
  1077.      */
  1078.     public function getIdpodcast()
  1079.     {
  1080.         return $this->idpodcast;
  1081.     }
  1082.     /**
  1083.      * Add idspectacle.
  1084.      *
  1085.      * @param \Spectacles $idspectacle
  1086.      *
  1087.      * @return Persons
  1088.      */
  1089.     public function addIdspectacle(Spectacles $idspectacle)
  1090.     {
  1091.         $this->idspectacle[] = $idspectacle;
  1092.         return $this;
  1093.     }
  1094.     /**
  1095.      * Remove idspectacle.
  1096.      *
  1097.      * @param \Spectacles $idspectacle
  1098.      *
  1099.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  1100.      */
  1101.     public function removeIdspectacle(Spectacles $idspectacle)
  1102.     {
  1103.         return $this->idspectacle->removeElement($idspectacle);
  1104.     }
  1105.     /**
  1106.      * Get idspectacle.
  1107.      *
  1108.      * @return \Doctrine\Common\Collections\Collection
  1109.      */
  1110.     public function getIdspectacle()
  1111.     {
  1112.         return $this->idspectacle;
  1113.     }
  1114.     /**
  1115.      * Add textAuthortext.
  1116.      *
  1117.      * @param \Texts $textAuthortext
  1118.      *
  1119.      * @return Persons
  1120.      */
  1121.     public function addTextAuthortext(Texts $textAuthortext)
  1122.     {
  1123.         $this->textAuthortext[] = $textAuthortext;
  1124.         return $this;
  1125.     }
  1126.     /**
  1127.      * Remove textAuthortext.
  1128.      *
  1129.      * @param \Texts $textAuthortext
  1130.      *
  1131.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  1132.      */
  1133.     public function removeTextAuthortext(Texts $textAuthortext)
  1134.     {
  1135.         return $this->textAuthortext->removeElement($textAuthortext);
  1136.     }
  1137.     /**
  1138.      * Get textAuthortext.
  1139.      *
  1140.      * @return \Doctrine\Common\Collections\Collection
  1141.      */
  1142.     public function getTextAuthortext()
  1143.     {
  1144.         return $this->textAuthortext;
  1145.     }
  1146.     /**
  1147.      * Add textTranslatortext.
  1148.      *
  1149.      * @param \Texts $textTranslatortext
  1150.      *
  1151.      * @return Persons
  1152.      */
  1153.     public function addTextTranslatortext(Texts $textTranslatortext)
  1154.     {
  1155.         $this->textTranslatortext[] = $textTranslatortext;
  1156.         return $this;
  1157.     }
  1158.     /**
  1159.      * Remove textTranslatortext.
  1160.      *
  1161.      * @param \Texts $textTranslatortext
  1162.      *
  1163.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  1164.      */
  1165.     public function removeTextTranslatortext(Texts $textTranslatortext)
  1166.     {
  1167.         return $this->textTranslatortext->removeElement($textTranslatortext);
  1168.     }
  1169.     /**
  1170.      * Get textTranslatortext.
  1171.      *
  1172.      * @return \Doctrine\Common\Collections\Collection
  1173.      */
  1174.     public function getTextTranslatortext()
  1175.     {
  1176.         return $this->textTranslatortext;
  1177.     }
  1178.     /**
  1179.      * Add textPersontext
  1180.      *
  1181.      * @param \Texts $textPersontext
  1182.      *
  1183.      * @return Persons
  1184.      */
  1185.     public function addTextPersontext(Texts $textPersontext)
  1186.     {
  1187.         $this->textPersontext[] = $textPersontext;
  1188.         return $this;
  1189.     }
  1190.     /**
  1191.      * Remove textPersontext
  1192.      *
  1193.      * @param \Texts $textPersontext
  1194.      *
  1195.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  1196.      */
  1197.     public function removeTextPersontext(Texts $textPersontext)
  1198.     {
  1199.         return $this->textPersontext->removeElement($textPersontext);
  1200.     }
  1201.     /**
  1202.      * Get textPersontext
  1203.      *
  1204.      * @return \Doctrine\Common\Collections\Collection
  1205.      */
  1206.     public function getTextPersontext()
  1207.     {
  1208.         return $this->textPersontext;
  1209.     }
  1210.     /**
  1211.      * Assign entity properties using an array
  1212.      *
  1213.      * @param array $attributes assoc array of values to assign
  1214.      * @return null
  1215.      */
  1216.     public function fromArray(array $attributes)
  1217.     {
  1218.         foreach ($attributes as $name => $value) {
  1219.             if (property_exists($this$name)) {
  1220.                 $methodName $this->_getSetterName($name);
  1221.                 if ($methodName) {
  1222.                     $this->{$methodName}($value);
  1223.                 } else {
  1224.                     $this->$name $value;
  1225.                 }
  1226.             }
  1227.         }
  1228.     }
  1229.     /**
  1230.      * Get property setter method name (if exists)
  1231.      *
  1232.      * @param string $propertyName entity property name
  1233.      * @return false|string
  1234.      */
  1235.     protected function _getSetterName($propertyName)
  1236.     {
  1237.         $prefixes = array('add''set');
  1238.         foreach ($prefixes as $prefix) {
  1239.             $methodName sprintf('%s%s'$prefixucfirst(strtolower($propertyName)));
  1240.             if (method_exists($this$methodName)) {
  1241.                 return $methodName;
  1242.             }
  1243.         }
  1244.         return false;
  1245.     }
  1246.     public function __toString()
  1247.     {
  1248.         return $this->firstname ' ' $this->lastname;
  1249.     }
  1250. }