Skip to content

Commit 1a88fca

Browse files
release
1 parent d0f9bce commit 1a88fca

File tree

3 files changed

+37
-25
lines changed

3 files changed

+37
-25
lines changed

README.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ $hdb = Hamper::getInstance();
3131

3232
## Documentation
3333

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.
3541

3642
### All Functions
3743

@@ -82,7 +88,7 @@ $hdb->query("SET NAMES utf8");
8288
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
8389
```
8490

85-
#### Legacy
91+
#### 😿 Legacy
8692

8793
This method replace this kind of legacy code
8894

@@ -114,7 +120,7 @@ $hdb->query("SET NAMES utf8");
114120
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
115121
```
116122

117-
#### Legacy
123+
#### 😿 Legacy
118124

119125
This method replace this kind of legacy code
120126

@@ -146,7 +152,7 @@ $hdb->query("SET NAMES utf8");
146152
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
147153
```
148154

149-
#### Legacy
155+
#### 😿 Legacy
150156

151157
This method replace this kind of legacy code
152158

@@ -172,7 +178,7 @@ This method is useful to handle this situations
172178
$crmId = $hdb->fetchValue("SELECT crmid FROM vtiger_crmentity WHERE setype=? AND deleted=0", [$module]);
173179
```
174180

175-
#### Legacy
181+
#### 😿 Legacy
176182

177183
This method replace this kind of legacy code
178184

@@ -210,7 +216,7 @@ $hdb->query("SET NAMES utf8");
210216
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
211217
```
212218

213-
#### Legacy
219+
#### 😿 Legacy
214220

215221
This method replace this kind of legacy code
216222

@@ -242,7 +248,7 @@ $hdb->query("SET NAMES utf8");
242248
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
243249
```
244250

245-
#### Legacy
251+
#### 😿 Legacy
246252

247253
This method replace this kind of legacy code
248254

@@ -274,7 +280,7 @@ $hdb->query("SET NAMES utf8");
274280
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
275281
```
276282

277-
#### Legacy
283+
#### 😿 Legacy
278284

279285
This method replace this kind of legacy code
280286

@@ -306,7 +312,7 @@ $hdb->query("SET NAMES utf8");
306312
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
307313
```
308314

309-
#### Legacy
315+
#### 😿 Legacy
310316

311317
This method replace this kind of legacy code
312318

@@ -338,7 +344,7 @@ $hdb->query("SET NAMES utf8");
338344
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
339345
```
340346

341-
#### Legacy
347+
#### 😿 Legacy
342348

343349
This method replace this kind of legacy code
344350

@@ -370,7 +376,7 @@ $hdb->query("SET NAMES utf8");
370376
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
371377
```
372378

373-
#### Legacy
379+
#### 😿 Legacy
374380

375381
This method replace this kind of legacy code
376382

@@ -392,7 +398,7 @@ query($sql, $params = [], $options = [])
392398

393399
This method is useful to handle this situations
394400

395-
#### Legacy
401+
#### 😿 Legacy
396402

397403
This method replace this kind of legacy code
398404

contrib/update-readme.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
foreach ($docBlock->getTagsByName('example') as $tag) {
4040
$documentation .= "```php\n" . $tag->getDescription() . "\n```\n\n";
4141
}
42-
$documentation .= "#### Legacy\n\nThis method replace this kind of legacy code\n\n";
42+
$documentation .= "#### 😿 Legacy\n\nThis method replace this kind of legacy code\n\n";
4343
foreach ($docBlock->getTagsByName('legacy') as $tag) {
4444
$documentation .= "```php\n" . $tag->getDescription() . "\n```\n\n";
4545
}

docs/README.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ $hdb = Hamper::getInstance();
3131

3232
## Documentation
3333

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.
3541

3642
### All Functions
3743

@@ -82,7 +88,7 @@ $hdb->query("SET NAMES utf8");
8288
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
8389
```
8490

85-
#### Legacy
91+
#### 😿 Legacy
8692

8793
This method replace this kind of legacy code
8894

@@ -114,7 +120,7 @@ $hdb->query("SET NAMES utf8");
114120
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
115121
```
116122

117-
#### Legacy
123+
#### 😿 Legacy
118124

119125
This method replace this kind of legacy code
120126

@@ -146,7 +152,7 @@ $hdb->query("SET NAMES utf8");
146152
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
147153
```
148154

149-
#### Legacy
155+
#### 😿 Legacy
150156

151157
This method replace this kind of legacy code
152158

@@ -172,7 +178,7 @@ This method is useful to handle this situations
172178
$crmId = $hdb->fetchValue("SELECT crmid FROM vtiger_crmentity WHERE setype=? AND deleted=0", [$module]);
173179
```
174180

175-
#### Legacy
181+
#### 😿 Legacy
176182

177183
This method replace this kind of legacy code
178184

@@ -210,7 +216,7 @@ $hdb->query("SET NAMES utf8");
210216
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
211217
```
212218

213-
#### Legacy
219+
#### 😿 Legacy
214220

215221
This method replace this kind of legacy code
216222

@@ -242,7 +248,7 @@ $hdb->query("SET NAMES utf8");
242248
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
243249
```
244250

245-
#### Legacy
251+
#### 😿 Legacy
246252

247253
This method replace this kind of legacy code
248254

@@ -274,7 +280,7 @@ $hdb->query("SET NAMES utf8");
274280
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
275281
```
276282

277-
#### Legacy
283+
#### 😿 Legacy
278284

279285
This method replace this kind of legacy code
280286

@@ -306,7 +312,7 @@ $hdb->query("SET NAMES utf8");
306312
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
307313
```
308314

309-
#### Legacy
315+
#### 😿 Legacy
310316

311317
This method replace this kind of legacy code
312318

@@ -338,7 +344,7 @@ $hdb->query("SET NAMES utf8");
338344
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
339345
```
340346

341-
#### Legacy
347+
#### 😿 Legacy
342348

343349
This method replace this kind of legacy code
344350

@@ -370,7 +376,7 @@ $hdb->query("SET NAMES utf8");
370376
$hdb->query("UPDATE vtiger_users SET language = ? WHERE user_name = ?", ["en_us", "admin"]);
371377
```
372378

373-
#### Legacy
379+
#### 😿 Legacy
374380

375381
This method replace this kind of legacy code
376382

@@ -392,7 +398,7 @@ query($sql, $params = [], $options = [])
392398

393399
This method is useful to handle this situations
394400

395-
#### Legacy
401+
#### 😿 Legacy
396402

397403
This method replace this kind of legacy code
398404

0 commit comments

Comments
 (0)