You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Mettre à jour la liste des paquets puis installer les pré-requis
43
+
44
+
45
+
### Configuration Apache
46
+
* S'assurer qu'Apache permet aux dossiers de travail de surcharger la configuration (pour accepter les fichiers [.htaccess](https://httpd.apache.org/docs/2.2/fr/howto/htaccess.html))
47
+
* Activer le module Apache `rewrite`
48
+
49
+
### Configuration du projet
50
+
* Ouvrir le fichier `includes/applications/setup.json` et identifier le préfixe associer à `localhost` (par défaut `dev`)
51
+
* Ouvrir le fichier `includes/applications/dev.config.json` correspondant à la configuration prise en compte
52
+
53
+
Composants
54
+
---
55
+
Un composant est un ensemble de resources JS, CSS, medias regroupé pour permettre le bonne affichage / la bonne exécution d'une page / fonctionnalité.
56
+
57
+
Dans le projet, depuis un controller PHP il est possible de charger un composant via la méthode :
58
+
```php
59
+
Autoload::addComponent($pComponentName);
60
+
```
61
+
62
+
Cette méthode va s'occuper de centraliser l'ensemble des composants à charger afin de n'ajouter qu'une seule balise `script` et qu'une seule balise `link[rel="stylesheet"]`. Ces deux balises vont pointer leurs urls vers le `StaticController` du framework avec la liste des composants à charger en paramètres.
63
+
64
+
C'est ensuite la classe `Dependencies` qui va se charger de récupérer la liste des composants à charger pour en déduire les dépendances ainsi que l'ordre des fichiers (`js` ou `css`) à renvoyer.
65
+
66
+
**Note :** Les urls dans les fichiers `css` sont relatives aux fichiers et doivent être entourées de guillemets `"`
36
67
37
68
38
69
Forms
@@ -94,81 +125,93 @@ The 'addForm' method registers the Form object to Smarty and the current templat
94
125
</html>
95
126
```
96
127
97
-
Reminder
98
-
```json
128
+
#### Form's inputs available
99
129
INPUT[text|password|submit|...]
100
-
{
101
-
"label":"Input",
102
-
"tag":"input",
103
-
"require":true|false,
104
-
"attributes":
105
-
{
106
-
"type":"text"|"password"|"submit"...,
107
-
"value":"Default Value",
108
-
"class":...
109
-
}
110
-
}
130
+
```json
131
+
{
132
+
"label":"Input",
133
+
"tag":"input",
134
+
"require":true|false,
135
+
"attributes":
136
+
{
137
+
"type":"text"|"password"|"submit"...,
138
+
"value":"Default Value",
139
+
"class":...
140
+
}
141
+
}
142
+
```
143
+
111
144
CAPTCHA
112
-
{
113
-
"label":"Captcha",
114
-
"tag":"captcha",
115
-
"require":true|false,
116
-
"attributes":{
117
-
"backgroundColor":"#ffffff",
118
-
"fontSizeMax":13,
119
-
"fontSizeMin":13,
120
-
"width":100,
121
-
"height":30,
122
-
"rotation":15,
123
-
"fontColors":["#444444","#ff0000","#000000"],
124
-
"transparent":true,
125
-
"length":7,
126
-
"type":"random|calculus",
127
-
"valueMax":99
128
-
}
129
-
}
145
+
```json
146
+
{
147
+
"label":"Captcha",
148
+
"tag":"captcha",
149
+
"require":true|false,
150
+
"attributes":{
151
+
"backgroundColor":"#ffffff",
152
+
"fontSizeMax":13,
153
+
"fontSizeMin":13,
154
+
"width":100,
155
+
"height":30,
156
+
"rotation":15,
157
+
"fontColors":["#444444","#ff0000","#000000"],
158
+
"transparent":true,
159
+
"length":7,
160
+
"type":"random|calculus",
161
+
"valueMax":99
162
+
}
163
+
}
164
+
```
165
+
130
166
DATEPICKER
131
-
{
132
-
"label":"Datepicker",
133
-
"tag":"datepicker"
134
-
}
167
+
```json
168
+
{
169
+
"label":"Datepicker",
170
+
"tag":"datepicker"
171
+
}
172
+
```
135
173
UPLOAD
136
-
{
137
-
"label":"Fichier",
138
-
"tag":"upload"
139
-
"fileType":"jpg|png|...",
140
-
"fileName":"someName{id}",
141
-
"resize":[200, 200]
142
-
}
174
+
```json
175
+
{
176
+
"label":"Fichier",
177
+
"tag":"upload"
178
+
"fileType":"jpg|png|...",
179
+
"fileName":"someName{id}",
180
+
"resize":[200, 200]
181
+
}
182
+
```
143
183
RADIOGROUP
144
-
{
145
-
"label":"Radiogroup",
146
-
"tag":"radiogroup",
147
-
"display":"block",
148
-
"height":"200px",
149
-
"width":"400px",
150
-
"fromModel":
151
-
{
152
-
"model":"ModelName",
153
-
"method":"all",
154
-
"name":"field_name",
155
-
"value":"field_name_id"
156
-
}
157
-
}
184
+
```json
185
+
{
186
+
"label":"Radiogroup",
187
+
"tag":"radiogroup",
188
+
"display":"block",
189
+
"height":"200px",
190
+
"width":"400px",
191
+
"fromModel":
192
+
{
193
+
"model":"ModelName",
194
+
"method":"all",
195
+
"name":"field_name",
196
+
"value":"field_name_id"
197
+
}
198
+
}
199
+
```
158
200
CHECKBOXGROUP
159
-
{
160
-
"label":"Checkboxgroup",
161
-
"tag":"checkboxgroup",
162
-
"height":"200px",
163
-
"width":"400px",
164
-
"fromModel":
165
-
{
166
-
"model":"ModelName",
167
-
"method":"all",
168
-
"name":"field_name",
169
-
"value":"field_name_id"
170
-
}
171
-
}
201
+
```json
202
+
{
203
+
"label":"Checkboxgroup",
204
+
"tag":"checkboxgroup",
205
+
"height":"200px",
206
+
"width":"400px",
207
+
"fromModel":
208
+
{
209
+
"model":"ModelName",
210
+
"method":"all",
211
+
"name":"field_name",
212
+
"value":"field_name_id"
213
+
}
214
+
}
172
215
```
173
216
174
217
Debugger
@@ -188,6 +231,17 @@ trace($pString, $pDisplay);
188
231
trace_r($pObject, $pDisplay);
189
232
```
190
233
234
+
PHP Namespaces
235
+
-----------
236
+
namespace | contexte | description
237
+
--------------|------------|--------------
238
+
core \\*{subPackage}*\\ |Global |Classes & interfaces du package core
239
+
lib \\*{package}*\\*{subPackage}* |Global |Classes & interfaces des packages secondaire
240
+
app \\*{appName}*\\ models |Application |Modèles de l'application *appName*
241
+
app \\*{appName}*\\ controllers \\*{moduleName}* |Application|Controllers du module *{moduleName}* de l'application *{appName}*
0 commit comments