File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 11# CHANGELOG
22
3+ ## 1.3.2
4+
5+ - Table::__ constructor accepts options array. Available options: ` encoding ` , ` columns ` .
6+
7+ ``` php
8+ use XBase\Table;
9+
10+ // before 1.3.2
11+ $table = new Table(
12+ __DIR__.'/Resources/foxpro/1.dbf',
13+ ['column1', 'column2'],
14+ 'cp852'
15+ );
16+
17+ // since 1.3.2
18+ $table = new Table(
19+ __DIR__.'/Resources/foxpro/1.dbf',
20+ [
21+ 'columns' => ['column1', 'column2'],
22+ 'encoding' => 'cp852'
23+ ]
24+ );
25+ ```
26+
27+ - WritableTable ` editMode ` options.
28+ - ` clone ` Default. Creates a clone of original file and applies all changes to it. To save changes you need to call ` save ` method.
29+ - ` realtime ` Immediately apply changes for original table file. Changes cannot be undone.
30+
31+ ``` php
32+ use XBase\WritableTable;
33+
34+ // clone edit mode
35+ $tableWrite = new WritableTable(
36+ 'file.dbf',
37+ [
38+ 'encoding' => 'cp866',
39+ 'editMode' => WritableTable::EDIT_MODE_CLONE,
40+ ]
41+ );
42+ // do edits
43+ $tableWrite
44+ ->save()
45+ ->close();
46+
47+ // realtime edit mode
48+ $tableWrite = new WritableTable(
49+ 'file.dbf',
50+ [
51+ 'encoding' => 'cp866',
52+ 'editMode' => WritableTable::EDIT_MODE_REALTIME,
53+ ]
54+ );
55+ // do edits
56+ $tableWrite->close();
57+ ```
58+
59+
360## 1.3
461
562- all setters return $this.
You can’t perform that action at this time.
0 commit comments