1 | <?php |
||
12 | class PlageHoraireService |
||
13 | { |
||
14 | /** |
||
15 | * Initialisation du service avec les repository utilisés. |
||
16 | * |
||
17 | * @param SDIS62\Core\Ops\Repository\PlageHoraireRepositoryInterface $plagehoraire_repository |
||
18 | * @param SDIS62\Core\Ops\Repository\PompierRepositoryInterface $pompier_repository |
||
19 | * @param SDIS62\Core\Ops\Repository\PlanningRepositoryInterface $planning_repository |
||
20 | */ |
||
21 | public function __construct(PlageHoraireRepositoryInterface $plagehoraire_repository, |
||
29 | |||
30 | /** |
||
31 | * Retourne une plage horaire correspondant à l'id spécifié. |
||
32 | * |
||
33 | * @param mixed $id_plage_horaire |
||
34 | * |
||
35 | * @return SDIS62\Core\Ops\Entity\PlageHoraire |
||
36 | */ |
||
37 | public function find($id_plage_horaire) |
||
41 | |||
42 | /** |
||
43 | * Sauvegarde d'une plage horaire. |
||
44 | * |
||
45 | * @param array $data |
||
46 | * |
||
47 | * @return SDIS62\Core\Ops\Entity\PlageHoraire |
||
48 | */ |
||
49 | public function save(array $data) |
||
71 | |||
72 | /** |
||
73 | * Suppression d'une plage horaire. |
||
74 | * |
||
75 | * @param mixed $id_plage_horaire |
||
76 | */ |
||
77 | public function delete($id_plage_horaire) |
||
89 | } |
||
90 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: