src/Entity/Titre.php line 16

Open in your IDE?
  1. <?php
  2. /**
  3.  * Titre.php
  4.  * Created by Stéphane Brun
  5.  * Date: 03/05/2018 at 15:55
  6.  */
  7. namespace App\Entity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity(repositoryClass="App\Repository\TitreRepository")
  11.  * @ORM\Table(name="titre")
  12.  * @ORM\HasLifecycleCallbacks()
  13.  */
  14. class Titre
  15. {
  16.     /**
  17.      * @ORM\Column(name="TISBN", type="string", length=50, nullable=false)
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="NONE")
  20.      */
  21.     protected $id;
  22.     /**
  23.      * @ORM\Column(name="TTitre", type="string", length=600, nullable=true)
  24.      */
  25.     protected $titre;
  26.     /**
  27.      * @ORM\Column(name="TVoirAussi", type="string", length=50, nullable=true)
  28.      */
  29.     protected $voirAussi;
  30.     /**
  31.      * @ORM\Column(name="TVoirAussi2", type="string", length=50, nullable=true)
  32.      */
  33.     protected $voirAussi2;
  34.     /**
  35.      * @ORM\Column(name="TDewey", type="string", length=255, nullable=true)
  36.      */
  37.     protected $dewey;
  38.     /**
  39.      * @ORM\Column(name="TTitreAnglais", type="string", length=250, nullable=true)
  40.      */
  41.     protected $titreAnglais;
  42.     /**
  43.      * @ORM\Column(name="TAuteur", type="string", length=700, nullable=true)
  44.      */
  45.     protected $auteur;
  46.     /**
  47.      * @ORM\Column(name="TEditeur", type="string", length=350, nullable=true)
  48.      */
  49.     protected $editeurNom;
  50.     /**
  51.      * @ORM\Column(name="TAnneeParution", type="string", length=50, nullable=true)
  52.      */
  53.     protected $anneeParution;
  54.     /**
  55.      * @ORM\Column(name="TAParaitre", type="datetime", nullable=true)
  56.      */
  57.     protected $aParaitre;
  58.     /**
  59.      * @ORM\Column(name="TRef", type="string", length=255, nullable=true)
  60.      */
  61.     protected $reference;
  62.     /**
  63.      * has one Langue
  64.      *
  65.      * @ORM\ManyToOne(targetEntity="App\Entity\Langue", cascade={"persist"})
  66.      * @ORM\JoinColumn(name="TLangue", referencedColumnName="id", nullable=true)
  67.      */
  68.     protected $langue;
  69.     /**
  70.      * @ORM\Column(name="TPVU", type="float", nullable=true)
  71.      */
  72.     protected $pvu 0;
  73.     /**
  74.      * @ORM\Column(name="TTPS", type="boolean", nullable=true)
  75.      */
  76.     protected $tps;
  77.     /**
  78.      * @ORM\Column(name="TTVQ", type="boolean", nullable=true)
  79.      */
  80.     protected $tvq;
  81.     /**
  82.      * @ORM\Column(name="TEscompteGeneral", type="integer", nullable=true)
  83.      */
  84.     protected $escompteGeneral;
  85.     /**
  86.      * @ORM\Column(name="TEscompteDu", type="datetime", nullable=true)
  87.      */
  88.     protected $escompteDu;
  89.     /**
  90.      * @ORM\Column(name="TEscompteAu", type="datetime", nullable=true)
  91.      */
  92.     protected $escompteAu;
  93.     /**
  94.      * @ORM\Column(name="TPVUEscompte", type="float", nullable=true)
  95.      */
  96.     protected $pvuEscompte;
  97.     /**
  98.      * @ORM\Column(name="TRemiseNormale", type="integer")
  99.      */
  100.     protected $remiseNormale 0;
  101.     /**
  102.      * @ORM\Column(name="TCoutant", type="float", nullable=true)
  103.      */
  104.     protected $coutant 0;
  105.     /**
  106.      * @ORM\Column(name="TEmballage", type="string", length=25, nullable=true)
  107.      */
  108.     protected $emballage;
  109.     /**
  110.      * @ORM\Column(name="TMultiplicateur", type="integer", nullable=true)
  111.      */
  112.     protected $multiplicateur;
  113.     /**
  114.      * @ORM\Column(name="TTitreInternet", type="string", length=150, nullable=true)
  115.      */
  116.     protected $titreInternet;
  117.     /**
  118.      * @ORM\Column(name="TAuteurInternet", type="string", length=100, nullable=true)
  119.      */
  120.     protected $auteurInternet;
  121.     /**
  122.      * @ORM\Column(name="TNotesInternet", type="string", length=250, nullable=true)
  123.      */
  124.     protected $notesInternet;
  125.     /**
  126.      * @ORM\Column(name="TNbPages", type="integer", nullable=true)
  127.      */
  128.     protected $nbPages;
  129.     /**
  130.      * @ORM\Column(name="TFormat", type="string", length=50, nullable=true)
  131.      */
  132.     protected $format;
  133.     /**
  134.      * @ORM\Column(name="TImprimee", type="boolean", nullable=true)
  135.      */
  136.     protected $imprimee;
  137.     /**
  138.      * @ORM\Column(name="TMachine", type="string", length=50, nullable=true)
  139.      */
  140.     protected $machine;
  141.     /**
  142.      * @ORM\Column(name="TVille", type="string", length=50, nullable=true)
  143.      */
  144.     protected $ville;
  145.     /**
  146.      * @ORM\Column(name="TDateOffice", type="datetime", nullable=true)
  147.      */
  148.     protected $dateOffice;
  149.     /**
  150.      * @ORM\Column(name="TSemaineOffice", type="datetime", nullable=true)
  151.      */
  152.     protected $semaineOffice;
  153.     /**
  154.      * @ORM\Column(name="TDateEdition", type="string", nullable=true)
  155.      */
  156.     protected $dateEdition;
  157.     /**
  158.      * @ORM\Column(name="couverture", type="string", length=255, nullable=true)
  159.      */
  160.     protected $couverture;
  161.     /**
  162.      * @ORM\Column(name="memento_editeur", type="string", length=255, nullable=true)
  163.      */
  164.     protected $mementoEditeur;
  165.     /**
  166.      * @ORM\Column(name="memento_collection", type="string", length=255, nullable=true)
  167.      */
  168.     protected $mementoCollection;
  169.     /**
  170.      * @ORM\Column(name="memento_theme", type="string", length=255, nullable=true)
  171.      */
  172.     protected $mementoTheme;
  173.     /**
  174.      * has one Editeur
  175.      *
  176.      * @ORM\ManyToOne(targetEntity="App\Entity\Editeurs", inversedBy="titres", cascade={"persist"})
  177.      * @ORM\JoinColumn(name="editeur_id", referencedColumnName="id", nullable=true)
  178.      */
  179.     protected $editeur;
  180.     /**
  181.      * has many TitreCompany
  182.      *
  183.      * @ORM\OneToMany(targetEntity="App\Entity\TitreCompany", mappedBy="titre", cascade={"persist"})
  184.      */
  185.     protected $titreCompany;
  186.     /**
  187.      * has many CommandeDetail
  188.      *
  189.      * @ORM\OneToMany(targetEntity="App\Entity\CommandeDetail", mappedBy="produit", cascade={"persist"})
  190.      */
  191.     protected $commandeDetails;
  192.     /**
  193.      * One Category has Many Categories.
  194.      * @ORM\OneToMany(targetEntity="CommandeSpecialeDetail", mappedBy="produit", cascade={"persist"})
  195.      */
  196.     protected $commandesSpecialesDetail;
  197.     /**
  198.      * @ORM\Column(name="resume", type="string", length=3000, nullable=true)
  199.      */
  200.     protected $resume;
  201.     /**
  202.      * Many Products belong to one Category
  203.      *
  204.      * @var Category|null
  205.      * @ORM\ManyToOne(targetEntity="App\Entity\Category")
  206.      * @ORM\JoinColumn(name="category_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
  207.      */
  208.     private ?Category $category null;
  209.     /**
  210.      * @ORM\Column(name="created_at", type="datetime")
  211.      */
  212.     protected $createdAt;
  213.     public function __construct()
  214.     {
  215.         // Default values
  216.         $this->setTps(true);
  217.         $this->setRemiseNormale(40);
  218.         $this->createdAt = new \DateTime();
  219.     }
  220.     public function __toString()
  221.     {
  222.         return (string)$this->getId();
  223.     }
  224.     /**
  225.      * @return mixed
  226.      */
  227.     public function getId()
  228.     {
  229.         return preg_replace('/\s+/'''$this->id);
  230.     }
  231.     /**
  232.      * @param mixed $id
  233.      */
  234.     public function setId($id)
  235.     {
  236.         $id preg_replace('/\s+/'''$id);
  237.         $this->id $id;
  238.     }
  239.     /**
  240.      * @return mixed
  241.      */
  242.     public function getTitre()
  243.     {
  244.         return mb_strtoupper($this->titre);
  245.     }
  246.     /**
  247.      * @param mixed $titre
  248.      */
  249.     public function setTitre($titre null)
  250.     {
  251.         $this->titre mb_strtoupper($titre);
  252.     }
  253.     /**
  254.      * @return mixed
  255.      */
  256.     public function getVoirAussi()
  257.     {
  258.         return $this->voirAussi;
  259.     }
  260.     /**
  261.      * @param mixed $voirAussi
  262.      */
  263.     public function setVoirAussi($voirAussi null)
  264.     {
  265.         $this->voirAussi $voirAussi;
  266.     }
  267.     /**
  268.      * @return mixed
  269.      */
  270.     public function getVoirAussi2()
  271.     {
  272.         return $this->voirAussi2;
  273.     }
  274.     /**
  275.      * @param mixed $voirAussi2
  276.      */
  277.     public function setVoirAussi2($voirAussi2 null)
  278.     {
  279.         $this->voirAussi2 $voirAussi2;
  280.     }
  281.     /**
  282.      * @return mixed
  283.      */
  284.     public function getDewey()
  285.     {
  286.         return $this->dewey;
  287.     }
  288.     /**
  289.      * @param mixed $dewey
  290.      */
  291.     public function setDewey($dewey null)
  292.     {
  293.         $this->dewey $dewey;
  294.     }
  295.     /**
  296.      * @return mixed
  297.      */
  298.     public function getTitreAnglais()
  299.     {
  300.         return $this->titreAnglais;
  301.     }
  302.     /**
  303.      * @param mixed $titreAnglais
  304.      */
  305.     public function setTitreAnglais($titreAnglais null)
  306.     {
  307.         $this->titreAnglais $titreAnglais;
  308.     }
  309.     /**
  310.      * @return mixed
  311.      */
  312.     public function getAuteur()
  313.     {
  314.         return $this->auteur;
  315.     }
  316.     /**
  317.      * @param mixed $auteur
  318.      */
  319.     public function setAuteur($auteur null)
  320.     {
  321.         $this->auteur $auteur;
  322.     }
  323.     /**
  324.      * @return mixed
  325.      */
  326.     public function getEditeurNom()
  327.     {
  328.         return $this->editeurNom;
  329.     }
  330.     /**
  331.      * @param mixed $editeurNom
  332.      */
  333.     public function setEditeurNom($editeurNom null)
  334.     {
  335.         $this->editeurNom $editeurNom;
  336.     }
  337.     /**
  338.      * @return mixed
  339.      */
  340.     public function getAnneeParution()
  341.     {
  342.         return $this->anneeParution;
  343.     }
  344.     /**
  345.      * @param mixed $anneeParution
  346.      */
  347.     public function setAnneeParution($anneeParution null)
  348.     {
  349.         $this->anneeParution $anneeParution;
  350.     }
  351.     /**
  352.      * @return mixed
  353.      */
  354.     public function getAParaitre()
  355.     {
  356.         return $this->aParaitre;
  357.     }
  358.     /**
  359.      * @param mixed $aParaitre
  360.      */
  361.     public function setAParaitre($aParaitre null)
  362.     {
  363.         $this->aParaitre $aParaitre;
  364.     }
  365.     /**
  366.      * @return mixed
  367.      */
  368.     public function getReference()
  369.     {
  370.         return $this->reference;
  371.     }
  372.     /**
  373.      * @param mixed $reference
  374.      */
  375.     public function setReference($reference null)
  376.     {
  377.         $this->reference $reference;
  378.     }
  379.     /**
  380.      * @return mixed
  381.      */
  382.     public function getLangue()
  383.     {
  384.         return $this->langue;
  385.     }
  386.     /**
  387.      * @param mixed $langue
  388.      */
  389.     public function setLangue($langue null)
  390.     {
  391.         $this->langue $langue;
  392.     }
  393.     /**
  394.      * @return mixed
  395.      */
  396.     public function getPvu()
  397.     {
  398.         return $this->pvu;
  399.     }
  400.     /**
  401.      * @param mixed $pvu
  402.      */
  403.     public function setPvu($pvu null)
  404.     {
  405.         $this->pvu $pvu;
  406.     }
  407.     /**
  408.      * @return mixed
  409.      */
  410.     public function getTps()
  411.     {
  412.         return $this->tps;
  413.     }
  414.     /**
  415.      * @param mixed $tps
  416.      */
  417.     public function setTps($tps null)
  418.     {
  419.         $this->tps $tps;
  420.     }
  421.     /**
  422.      * @return boolean
  423.      */
  424.     public function isTps()
  425.     {
  426.         return $this->getTps();
  427.     }
  428.     /**
  429.      * @return mixed
  430.      */
  431.     public function getTvq()
  432.     {
  433.         return $this->tvq;
  434.     }
  435.     /**
  436.      * @param mixed $tvq
  437.      */
  438.     public function setTvq($tvq null)
  439.     {
  440.         $this->tvq $tvq;
  441.     }
  442.     /**
  443.      * @return boolean
  444.      */
  445.     public function isTvq()
  446.     {
  447.         return $this->getTvq();
  448.     }
  449.     /**
  450.      * @return mixed
  451.      */
  452.     public function getEscompteGeneral()
  453.     {
  454.         return $this->escompteGeneral;
  455.     }
  456.     /**
  457.      * @param mixed $escompteGeneral
  458.      */
  459.     public function setEscompteGeneral($escompteGeneral null)
  460.     {
  461.         $this->escompteGeneral $escompteGeneral;
  462.     }
  463.     /**
  464.      * @return mixed
  465.      */
  466.     public function getEscompteDu()
  467.     {
  468.         return $this->escompteDu;
  469.     }
  470.     /**
  471.      * @param mixed $escompteDu
  472.      */
  473.     public function setEscompteDu($escompteDu null)
  474.     {
  475.         $this->escompteDu $escompteDu;
  476.     }
  477.     /**
  478.      * @return mixed
  479.      */
  480.     public function getEscompteAu()
  481.     {
  482.         return $this->escompteAu;
  483.     }
  484.     /**
  485.      * @param mixed $escompteAu
  486.      */
  487.     public function setEscompteAu($escompteAu null)
  488.     {
  489.         $this->escompteAu $escompteAu;
  490.     }
  491.     /**
  492.      * @return mixed
  493.      */
  494.     public function getPvuEscompte()
  495.     {
  496.         return $this->pvuEscompte;
  497.     }
  498.     /**
  499.      * @param mixed $pvuEscompte
  500.      */
  501.     public function setPvuEscompte($pvuEscompte null)
  502.     {
  503.         $this->pvuEscompte $pvuEscompte;
  504.     }
  505.     /**
  506.      * @return mixed
  507.      */
  508.     public function getRemiseNormale()
  509.     {
  510.         return $this->remiseNormale;
  511.     }
  512.     /**
  513.      * @param mixed $remiseNormale
  514.      */
  515.     public function setRemiseNormale($remiseNormale null)
  516.     {
  517.         $this->remiseNormale $remiseNormale;
  518.     }
  519.     /**
  520.      * @return mixed
  521.      */
  522.     public function getCoutant()
  523.     {
  524.         if (empty($this->coutant) && !empty($this->pvu) && !empty($this->remiseNormale)) {
  525.             $this->coutant $this->pvu - ($this->pvu $this->remiseNormale 100);
  526.         }
  527.         return $this->coutant;
  528.     }
  529.     /**
  530.      * @param mixed $coutant
  531.      */
  532.     public function setCoutant($coutant null)
  533.     {
  534.         $this->coutant $coutant;
  535.     }
  536.     /**
  537.      * @return mixed
  538.      */
  539.     public function getEmballage()
  540.     {
  541.         return $this->emballage;
  542.     }
  543.     /**
  544.      * @param mixed $emballage
  545.      */
  546.     public function setEmballage($emballage null)
  547.     {
  548.         $this->emballage $emballage;
  549.     }
  550.     /**
  551.      * @return mixed
  552.      */
  553.     public function getMultiplicateur()
  554.     {
  555.         return $this->multiplicateur;
  556.     }
  557.     /**
  558.      * @param mixed $multiplicateur
  559.      */
  560.     public function setMultiplicateur($multiplicateur null)
  561.     {
  562.         $this->multiplicateur $multiplicateur;
  563.     }
  564.     /**
  565.      * @return mixed
  566.      */
  567.     public function getTitreInternet()
  568.     {
  569.         return $this->titreInternet;
  570.     }
  571.     /**
  572.      * @param mixed $titreInternet
  573.      */
  574.     public function setTitreInternet($titreInternet null)
  575.     {
  576.         $this->titreInternet $titreInternet;
  577.     }
  578.     /**
  579.      * @return mixed
  580.      */
  581.     public function getAuteurInternet()
  582.     {
  583.         return $this->auteurInternet;
  584.     }
  585.     /**
  586.      * @param mixed $auteurInternet
  587.      */
  588.     public function setAuteurInternet($auteurInternet null)
  589.     {
  590.         $this->auteurInternet $auteurInternet;
  591.     }
  592.     /**
  593.      * @return mixed
  594.      */
  595.     public function getNotesInternet()
  596.     {
  597.         return $this->notesInternet;
  598.     }
  599.     /**
  600.      * @param mixed $notesInternet
  601.      */
  602.     public function setNotesInternet($notesInternet null)
  603.     {
  604.         $this->notesInternet $notesInternet;
  605.     }
  606.     /**
  607.      * @return mixed
  608.      */
  609.     public function getNbPages()
  610.     {
  611.         return $this->nbPages;
  612.     }
  613.     /**
  614.      * @param mixed $nbPages
  615.      */
  616.     public function setNbPages($nbPages null)
  617.     {
  618.         $this->nbPages $nbPages;
  619.     }
  620.     /**
  621.      * @return mixed
  622.      */
  623.     public function getFormat()
  624.     {
  625.         return $this->format;
  626.     }
  627.     /**
  628.      * @param mixed $format
  629.      */
  630.     public function setFormat($format null)
  631.     {
  632.         $this->format $format;
  633.     }
  634.     /**
  635.      * @return boolean
  636.      */
  637.     public function getImprimee()
  638.     {
  639.         if (empty($this->imprimee)) {
  640.             return false;
  641.         }
  642.         return $this->imprimee;
  643.     }
  644.     /**
  645.      * @return boolean
  646.      */
  647.     public function isImprimee()
  648.     {
  649.         return $this->getImprimee();
  650.     }
  651.     /**
  652.      * @param mixed $imprimee
  653.      */
  654.     public function setImprimee($imprimee null)
  655.     {
  656.         $this->imprimee $imprimee;
  657.     }
  658.     /**
  659.      * @return mixed
  660.      */
  661.     public function getMachine()
  662.     {
  663.         return $this->machine;
  664.     }
  665.     /**
  666.      * @param mixed $machine
  667.      */
  668.     public function setMachine($machine null)
  669.     {
  670.         $this->machine $machine;
  671.     }
  672.     /**
  673.      * @return mixed
  674.      */
  675.     public function getVille()
  676.     {
  677.         return $this->ville;
  678.     }
  679.     /**
  680.      * @param mixed $ville
  681.      */
  682.     public function setVille($ville null)
  683.     {
  684.         $this->ville $ville;
  685.     }
  686.     /**
  687.      * @return mixed
  688.      */
  689.     public function getDateOffice()
  690.     {
  691.         return $this->dateOffice;
  692.     }
  693.     /**
  694.      * @param mixed $dateOffice
  695.      */
  696.     public function setDateOffice($dateOffice null)
  697.     {
  698.         $this->dateOffice $dateOffice;
  699.     }
  700.     /**
  701.      * @return mixed
  702.      */
  703.     public function getSemaineOffice()
  704.     {
  705.         return $this->semaineOffice;
  706.     }
  707.     /**
  708.      * @param mixed $semaineOffice
  709.      */
  710.     public function setSemaineOffice($semaineOffice null)
  711.     {
  712.         $this->semaineOffice $semaineOffice;
  713.     }
  714.     /**
  715.      * @return mixed
  716.      */
  717.     public function getDateEdition()
  718.     {
  719.         return $this->dateEdition;
  720.     }
  721.     /**
  722.      * @param mixed $dateEdition
  723.      */
  724.     public function setDateEdition($dateEdition null)
  725.     {
  726.         $this->dateEdition $dateEdition;
  727.     }
  728.     /**
  729.      * @return mixed
  730.      */
  731.     public function getCouverture()
  732.     {
  733.         return $this->couverture;
  734.     }
  735.     /**
  736.      * @param mixed $couverture
  737.      */
  738.     public function setCouverture($couverture null)
  739.     {
  740.         $this->couverture $couverture;
  741.     }
  742.     /**
  743.      * @return mixed
  744.      */
  745.     public function getEditeur()
  746.     {
  747.         return $this->editeur;
  748.     }
  749.     /**
  750.      * @param mixed $editeur
  751.      */
  752.     public function setEditeur(Editeurs $editeur=null)
  753.     {
  754.         $this->editeur $editeur;
  755.     }
  756.     /**
  757.      * @return mixed
  758.      */
  759.     public function getMementoEditeur()
  760.     {
  761.         return $this->mementoEditeur;
  762.     }
  763.     /**
  764.      * @param mixed $mementoEditeur
  765.      * @return Titre
  766.      */
  767.     public function setMementoEditeur($mementoEditeur)
  768.     {
  769.         $this->mementoEditeur $mementoEditeur;
  770.         return $this;
  771.     }
  772.     /**
  773.      * @return mixed
  774.      */
  775.     public function getMementoCollection()
  776.     {
  777.         return $this->mementoCollection;
  778.     }
  779.     /**
  780.      * @param mixed $mementoCollection
  781.      * @return Titre
  782.      */
  783.     public function setMementoCollection($mementoCollection)
  784.     {
  785.         $this->mementoCollection $mementoCollection;
  786.         return $this;
  787.     }
  788.     /**
  789.      * @return mixed
  790.      */
  791.     public function getMementoTheme()
  792.     {
  793.         return $this->mementoTheme;
  794.     }
  795.     /**
  796.      * @param mixed $mementoTheme
  797.      * @return Titre
  798.      */
  799.     public function setMementoTheme($mementoTheme)
  800.     {
  801.         $this->mementoTheme $mementoTheme;
  802.         return $this;
  803.     }
  804.     /**
  805.      * @return mixed
  806.      */
  807.     public function getCommandesSpecialesDetail()
  808.     {
  809.         return $this->commandesSpecialesDetail;
  810.     }
  811.     /**
  812.      * @param mixed $commandesSpecialesDetail
  813.      */
  814.     public function setCommandesSpecialesDetail($commandesSpecialesDetail)
  815.     {
  816.         $this->commandesSpecialesDetail $commandesSpecialesDetail;
  817.     }
  818.     /**
  819.      * @return mixed
  820.      */
  821.     public function getResume()
  822.     {
  823.         return $this->resume;
  824.     }
  825.     /**
  826.      * @param mixed $resume
  827.      */
  828.     public function setResume($resume): void
  829.     {
  830.         $this->resume mb_substr($resume03000);
  831.     }
  832.     /**
  833.      * @return Category|null
  834.      */
  835.     public function getCategory(): ?Category
  836.     {
  837.         return $this->category;
  838.     }
  839.     /**
  840.      * @param Category|null $category
  841.      * @return $this
  842.      */
  843.     public function setCategory(?Category $category): self
  844.     {
  845.         $this->category $category;
  846.         return $this;
  847.     }
  848.     /**
  849.      * @return mixed
  850.      */
  851.     public function getCreatedAt()
  852.     {
  853.         return $this->createdAt;
  854.     }
  855.     /**
  856.      * @param mixed $createdAt
  857.      */
  858.     public function setCreatedAt($createdAt): void
  859.     {
  860.         $this->createdAt $createdAt;
  861.     }
  862.     public function calculatedCoutant() {
  863.         $this->coutant round($this->pvu - ($this->pvu $this->remiseNormale 100),2);
  864.     }
  865.     /**
  866.      * @ORM\PrePersist
  867.      * @ORM\PreUpdate
  868.      */
  869.     public function sanitizeIsbn()
  870.     {
  871.         $this->setId(trim($this->getId()));
  872.     }
  873. }