<?phpnamespace NoteBundle\Form\Model;use CoreBundle\Entity\Branche;use CoreBundle\Entity\GroupStudent;use CoreBundle\Entity\Module;use CoreBundle\Entity\Periode;use CoreBundle\Entity\Secteur;class BulletinModel implements \JsonSerializable{    /**     * @var Branche     */    private $branche;    /**     * @var Secteur     */    private $secteur;    /**     * @var Periode     */    private $periode;    /**     * @var int     */    private $quad;    /**     * @var string     */    private $type;    /**     * @var string     */    private $format;    /**     * @var \DateTime     */    private $dateFrom;    /**     * @var \DateTime     */    private $dateTo;    /**     * @var string     */    private $template;    /**     * @return Periode     */    public function getPeriode()    {        return $this->periode;    }    /**     * @param Periode $periode     * @return BulletinModel     */    public function setPeriode(Periode $periode): self    {        $this->periode = $periode;        return $this;    }    /**     * @return string     */    public function getType()    {        return $this->type;    }    /**     * @param string $type     * @return BulletinModel     */    public function setType(string $type): self    {        $this->type = $type;        return $this;    }    /**     * @return \DateTime     */    public function getDateFrom()    {        return $this->dateFrom;    }    /**     * @param \DateTime $dateFrom     * @return BulletinModel     */    public function setDateFrom(\DateTime $dateFrom): self    {        $this->dateFrom = $dateFrom;        return $this;    }    /**     * @return \DateTime     */    public function getDateTo()    {        return $this->dateTo;    }    /**     * @param \DateTime $dateTo     * @return BulletinModel     */    public function setDateTo(\DateTime $dateTo): self    {        $this->dateTo = $dateTo;        return $this;    }    /**     * @return int     */    public function getQuad()    {        return $this->quad;    }    /**     * @param int $quad     * @return BulletinModel     */    public function setQuad(int $quad): self    {        $this->quad = $quad;        return $this;    }    /**     * @return Branche     */    public function getBranche(): ?Branche    {        return $this->branche;    }    /**     * @param Branche $branche     * @return BulletinModel     */    public function setBranche(Branche $branche): self    {        $this->branche = $branche;        return $this;    }    /**     * @return Secteur     */    public function getSecteur(): ?Secteur    {        return $this->secteur;    }    /**     * @param Secteur $secteur     * @return BulletinModel     */    public function setSecteur(Secteur $secteur): self    {        $this->secteur = $secteur;        return $this;    }    /**     * @return string     */    public function getFormat(): ?string    {        return $this->format;    }    /**     * @param string $format     * @return BulletinModel     */    public function setFormat(string $format): self    {        $this->format = $format;        return $this;    }    public function getTemplate(): ?string    {        return $this->template;    }    public function setTemplate(string $template): self    {        $this->template = $template;        return $this;    }    /**     * Specify data which should be serialized to JSON     * @link https://php.net/manual/en/jsonserializable.jsonserialize.php     * @return mixed data which can be serialized by <b>json_encode</b>,     * which is a value of any type other than a resource.     * @since 5.4.0     */    public function jsonSerialize()    {        return [            'branche' => $this->branche->getId(),            'secteur' => (null !== $this->secteur) ? $this->secteur->getId() : null,            'periode' => $this->periode->getId(),            'quad' => $this->quad,            'type' => $this->type,            'format' => $this->format,            'from' => $this->dateFrom->format('Y-m-d'),            'to' => $this->dateTo->format('Y-m-d'),            'template' => $this->template        ];    }}