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() { |
||
35 | return ["app" => self::$values]; |
||
36 | } |
||
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) { |
||
98 | |||
99 | /** |
||
100 | * @param $from |
||
101 | * @param $to |
||
102 | * @param $sujet |
||
103 | * @param $message |
||
104 | */ |
||
105 | public static function envoyerMail($from, $to, $sujet, $message) { |
||
127 | |||
128 | /** |
||
129 | * @return int |
||
130 | */ |
||
131 | public static function getIdIdentite() { |
||
138 | //-------------------------- FIN GETTER ----------------------------------------------------------------------------// |
||
139 | |||
140 | |||
141 | |||
142 | //-------------------------- SETTER ----------------------------------------------------------------------------// |
||
143 | /** |
||
144 | * @param $values |
||
145 | * can set values while keep older infos |
||
146 | */ |
||
147 | public static function setValues($values) { |
||
150 | |||
151 | /** |
||
152 | * @param $title |
||
153 | * function to set title of the page |
||
154 | */ |
||
155 | public static function setTitle($title) { |
||
158 | |||
159 | /** |
||
160 | * @param $description |
||
161 | * function to set description of the page |
||
162 | */ |
||
163 | public static function setDescription($description) { |
||
166 | //-------------------------- FIN SETTER ----------------------------------------------------------------------------// |
||
167 | } |