@@ -31,7 +31,13 @@ $hdb = Hamper::getInstance();
31
31
32
32
## Documentation
33
33
34
- TEST
34
+ The documentation lists all the functions you can use to make the code simple and easy to read.
35
+ The access you have on the data inside the database is based on extraction methods that return ` array `
36
+ and that you can easily manipulate with ` foreach ` .
37
+ Use the functions well because they allow you to take a single record or a list of records or all the values of a column.
38
+ Before starting to use it, read the list of functions carefully, and you will automatically use the best one based on the context.
39
+ For each function you are also presented, the "😿 Legacy", the version of the old style Vtiger code you can replace with Hamper functions,
40
+ comparing them, and you will realize how Hamper improves your work.
35
41
36
42
### All Functions
37
43
@@ -82,7 +88,7 @@ $hdb->query("SET NAMES utf8");
82
88
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
83
89
```
84
90
85
- #### Legacy
91
+ #### 😿 Legacy
86
92
87
93
This method replace this kind of legacy code
88
94
@@ -114,7 +120,7 @@ $hdb->query("SET NAMES utf8");
114
120
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
115
121
```
116
122
117
- #### Legacy
123
+ #### 😿 Legacy
118
124
119
125
This method replace this kind of legacy code
120
126
@@ -146,7 +152,7 @@ $hdb->query("SET NAMES utf8");
146
152
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
147
153
```
148
154
149
- #### Legacy
155
+ #### 😿 Legacy
150
156
151
157
This method replace this kind of legacy code
152
158
@@ -172,7 +178,7 @@ This method is useful to handle this situations
172
178
$crmId = $hdb->fetchValue("SELECT crmid FROM vtiger_crmentity WHERE setype=? AND deleted=0", [$module]);
173
179
```
174
180
175
- #### Legacy
181
+ #### 😿 Legacy
176
182
177
183
This method replace this kind of legacy code
178
184
@@ -210,7 +216,7 @@ $hdb->query("SET NAMES utf8");
210
216
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
211
217
```
212
218
213
- #### Legacy
219
+ #### 😿 Legacy
214
220
215
221
This method replace this kind of legacy code
216
222
@@ -242,7 +248,7 @@ $hdb->query("SET NAMES utf8");
242
248
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
243
249
```
244
250
245
- #### Legacy
251
+ #### 😿 Legacy
246
252
247
253
This method replace this kind of legacy code
248
254
@@ -274,7 +280,7 @@ $hdb->query("SET NAMES utf8");
274
280
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
275
281
```
276
282
277
- #### Legacy
283
+ #### 😿 Legacy
278
284
279
285
This method replace this kind of legacy code
280
286
@@ -306,7 +312,7 @@ $hdb->query("SET NAMES utf8");
306
312
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
307
313
```
308
314
309
- #### Legacy
315
+ #### 😿 Legacy
310
316
311
317
This method replace this kind of legacy code
312
318
@@ -338,7 +344,7 @@ $hdb->query("SET NAMES utf8");
338
344
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
339
345
```
340
346
341
- #### Legacy
347
+ #### 😿 Legacy
342
348
343
349
This method replace this kind of legacy code
344
350
@@ -370,7 +376,7 @@ $hdb->query("SET NAMES utf8");
370
376
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
371
377
```
372
378
373
- #### Legacy
379
+ #### 😿 Legacy
374
380
375
381
This method replace this kind of legacy code
376
382
@@ -392,7 +398,7 @@ query($sql, $params = [], $options = [])
392
398
393
399
This method is useful to handle this situations
394
400
395
- #### Legacy
401
+ #### 😿 Legacy
396
402
397
403
This method replace this kind of legacy code
398
404
0 commit comments