1 | <?php |
||
6 | class App { |
||
7 | private static $database; |
||
8 | private static $nav; |
||
9 | private static $erreur; |
||
10 | |||
11 | private static $title; |
||
12 | private static $description; |
||
13 | |||
14 | private static $values = []; |
||
15 | |||
16 | |||
17 | //-------------------------- CONSTRUCTEUR ----------------------------------------------------------------------------// |
||
18 | public function __construct() { |
||
21 | //-------------------------- FIN CONSTRUCTEUR ----------------------------------------------------------------------------// |
||
22 | |||
23 | |||
24 | |||
25 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
||
26 | public static function getErreur() { |
||
29 | |||
30 | /** |
||
31 | * @return array |
||
32 | * get array of all values wich will be used in the page |
||
33 | */ |
||
34 | public static function getValues() { |
||
37 | |||
38 | /** |
||
39 | * @return Database |
||
40 | * renvoi une instance de la classe Database |
||
41 | */ |
||
42 | public static function getDb() { |
||
48 | |||
49 | /** |
||
50 | * @param null $no_module |
||
51 | * @return Navigation |
||
52 | * renvoi une instancde de la class navigation |
||
53 | */ |
||
54 | public static function getNav($no_module = null) { |
||
61 | |||
62 | /** |
||
63 | * @return mixed |
||
64 | * function tu get the title of the page |
||
65 | */ |
||
66 | public static function getTitle() { |
||
69 | |||
70 | /** |
||
71 | * @return mixed |
||
72 | * function to get description of the page |
||
73 | */ |
||
74 | public static function getDescription() { |
||
77 | |||
78 | /** |
||
79 | * @param string $url |
||
80 | * fonction qui permet de supprmer un dossier avec toute son abrorescence en fonction d'une URL |
||
81 | */ |
||
82 | public static function supprimerDossier($url) { |
||
94 | |||
95 | /** |
||
96 | * @param $from |
||
97 | * @param $to |
||
98 | * @param $sujet |
||
99 | * @param $message |
||
100 | */ |
||
101 | public static function envoyerMail($from, $to, $sujet, $message) { |
||
123 | //-------------------------- FIN GETTER ----------------------------------------------------------------------------// |
||
124 | |||
125 | |||
126 | |||
127 | //-------------------------- SETTER ----------------------------------------------------------------------------// |
||
128 | /** |
||
129 | * @param $values |
||
130 | * can set values while keep older infos |
||
131 | */ |
||
132 | public static function setValues($values) { |
||
135 | |||
136 | /** |
||
137 | * @param $title |
||
138 | * function to set title of the page |
||
139 | */ |
||
140 | public static function setTitle($title) { |
||
143 | |||
144 | /** |
||
145 | * @param $description |
||
146 | * function to set description of the page |
||
147 | */ |
||
148 | public static function setDescription($description) { |
||
151 | //-------------------------- FIN SETTER ----------------------------------------------------------------------------// |
||
152 | } |