Php Xbase Versions Save

A simple parser for *.dbf files using PHP

2.1.0

2 years ago

Features

#109 replaceable encoder for converters (@retnek)

2.0.0

3 years ago

New features

  • TableCreator allows you to create DBF table files.

Breaking changes

  • Table replaced by TableReader
  • WritableTable replaced by TableEditor
  • removed all Record methods like get*() except get and getDateTimeObject.
  • removed all Record methods like set*() except set

1.4.0

3 years ago

Deprecations

  • Use XBase\TableReader instead of XBase\Table
  • Use XBase\TableEditor instead of XBase\WritableTable.

1.3.4

3 years ago

#101 Add test file for DBase 7 Double type (@aaronhuisinga)

1.3.2

3 years ago
  • Table::__constructor accepts second argument as an options array. Available options: encoding, columns.
use XBase\Table;

// before 1.3.2
$table = new Table(
    __DIR__.'/Resources/foxpro/1.dbf', 
    ['column1', 'column2'], 
    'cp852'
);

// since 1.3.2
$table = new Table(
    __DIR__.'/Resources/foxpro/1.dbf', 
    [
        'columns' => ['column1', 'column2'], 
        'encoding' => 'cp852'
    ]
);
  • WritableTable editMode option.
    • clone Default. Creates a clone of original file and applies all changes to it. To save changes you need to call save method.
    • realtime Immediately apply changes for original table file. Changes cannot be undone.
use XBase\WritableTable;

// clone edit mode
$tableWrite = new WritableTable(
    'file.dbf', 
    [
        'encoding' => 'cp866',
        'editMode' => WritableTable::EDIT_MODE_CLONE,
    ]
);
// do edits
$tableWrite
    ->save()
    ->close();

// realtime edit mode
$tableWrite = new WritableTable(
    'file.dbf', 
    [
        'encoding' => 'cp866',
        'editMode' => WritableTable::EDIT_MODE_REALTIME,
    ]
);
// do edits
$tableWrite->close();

1.3.1

3 years ago

Fixes

#94 VisualFoxPro\DateTimeConverter (@ebta)

1.3.0

3 years ago

Features

add

  • declare(strict_types=1); for all files
  • Ability to add, edit and delete memo entries for VFP, Foxpro and DBase7.
  • All setters return $this.
  • RecordInterface::get('name') is main getter
  • RecordInterface::set('name', $value) is main setter
  • WritableTable::save you should use it to save table changes.

changes

  • Getter for type D (Date) returns date string in 'Ymd' format instead of timestamp.
  • VisualFoxproRecord::getDateTime returns object of \DateTimeInterface instead of timestamp.

deprecations

  • RecordInterface::getObject
  • RecordInterface::setObject
  • Setters like Record::setType. Use set('name', $value) method instead.
  • Getters like Record::getType. Use get('name') method instead.
  • WritableTable::openWrite. Method is no longer needed.

fixes

  • Can't add/update memo field (long text) #91
  • Missing end-of-file marker #43

1.2.2

3 years ago

fixed #89

1.2.1

3 years ago

1.2.0

3 years ago

Better support for different DBF table types

  • MemoFactory for different Memo types
  • dBase7 support

Fixed

  • #55
  • #45
  • #40