<?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 AbsenceModel implements \JsonSerializable{    /**     * @var Branche     */    private $branche;    /**     * @var Secteur     */    private $secteur;    /**     * @var GroupStudent     */    private $group;    /**     * @var int     */    private $month;    /**     * @var int     */    private $year;    /**     * @return GroupStudent     */    public function getGroup(): ?GroupStudent    {        return $this->group;    }    /**     * @param GroupStudent $group     * @return AbsenceModel     */    public function setGroup(GroupStudent $group): AbsenceModel    {        $this->group = $group;        return $this;    }    /**     * @return int     */    public function getMonth(): int    {        return $this->month;    }    /**     * @param int $month     * @return AbsenceModel     */    public function setMonth(int $month): AbsenceModel    {        $this->month = $month;        return $this;    }    /**     * @return int     */    public function getYear(): int    {        return $this->year;    }    /**     * @param int $year     * @return AbsenceModel     */    public function setYear(int $year): AbsenceModel    {        $this->year = $year;        return $this;    }    /**     * @return Branche     */    public function getBranche(): ?Branche    {        return $this->branche;    }    /**     * @param Branche $branche     * @return AbsenceModel     */    public function setBranche(Branche $branche): AbsenceModel    {        $this->branche = $branche;        return $this;    }    /**     * @return Secteur     */    public function getSecteur(): ?Secteur    {        return $this->secteur;    }    /**     * @param Secteur $secteur     * @return AbsenceModel     */    public function setSecteur(Secteur $secteur): AbsenceModel    {        $this->secteur = $secteur;        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,            'month' => $this->month,            'year' => $this->year,            'group' => (null !== $this->group) ? $this->group->getId() : null        ];    }}