1 | <?php |
||
5 | trait GestionErreurContenus { |
||
6 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
||
7 | /** |
||
8 | * @param string $nom_table |
||
9 | * @param string $nom_id_table |
||
10 | * @param string $champ |
||
11 | * @param $value |
||
12 | * @param integer $limit_char |
||
13 | * @param string $err_char |
||
14 | * @param string $err_egalite |
||
15 | * @param null $value_id_table |
||
16 | * @return string |
||
17 | * fonction qui permet de vérifier qu'il n'y ait pas d'erreur dans le champ spécifié ni de doublons |
||
18 | */ |
||
19 | private function getVerifChamp($nom_table, $nom_id_table, $champ, $value, $limit_char, $err_char, $err_egalite, $value_id_table = null) { |
||
31 | |||
32 | /** |
||
33 | * @param $balise_title |
||
34 | * @param null $id_page |
||
35 | * @return string |
||
36 | */ |
||
37 | private function getTestBaliseTitle($balise_title, $id_page = null) { |
||
42 | |||
43 | /** |
||
44 | * @param $url |
||
45 | * @param null $id_page |
||
46 | * @return string |
||
47 | */ |
||
48 | private function getTestUrl($url, $id_page = null) { |
||
53 | |||
54 | /** |
||
55 | * @param $meta_description |
||
56 | * @param null $id_page |
||
57 | * @return string |
||
58 | */ |
||
59 | private function getTestMetaDescription($meta_description, $id_page = null) { |
||
64 | |||
65 | /** |
||
66 | * @param $titre_page |
||
67 | * @param null $id_page |
||
68 | * @return string |
||
69 | */ |
||
70 | private function getTestTitrePage($titre_page, $id_page = null) { |
||
75 | //-------------------------- END GETTER ----------------------------------------------------------------------------// |
||
76 | |||
77 | |||
78 | //-------------------------- SETTER ----------------------------------------------------------------------------// |
||
79 | /** |
||
80 | * @param string $url |
||
81 | * @param string $err_balise_title |
||
82 | * @param string $err_url |
||
83 | * @param string $err_meta_description |
||
84 | * @param string $err_titre_page |
||
85 | */ |
||
86 | private function setErreurContenus($balise_title, $url, $meta_description, $titre_page, $parent, $err_balise_title, $err_url, $err_meta_description, $err_titre_page) { |
||
97 | //-------------------------- END SETTER ----------------------------------------------------------------------------// |
||
98 | } |
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: