keboola / php-csvtable
CSV file class with Keboola StorageApi extensions
Installs: 12 876
Dependents: 7
Suggesters: 0
Security: 0
Stars: 0
Watchers: 18
Forks: 1
Open Issues: 0
Requires
- php: ^8.1
- keboola/csv: ^4.0
- keboola/php-temp: ^2.0
Requires (Dev)
- keboola/coding-standard: ^13.0
- php-parallel-lint/php-parallel-lint: ^1.3
- phpstan/phpstan: ^1.4
- phpunit/phpunit: >=7.5
This package is auto-updated.
Last update: 2024-11-17 10:56:09 UTC
README
Description
A class that extends Keboola\CsvFile functionality by adding Keboola StorageApi Attribute and PrimaryKey variables
Usage
use Keboola\CsvTable\Table; $table = new Table('name', ['id', 'column', 'names']); $table->writeRow(['1','row','data']); $table->addAttributes(['created_by' => $username]); $table->setPrimaryKey('id');
Result:
id,column,names
"1","row","data"
Development
Clone this repository and init the workspace with following command:
git clone https://github.com/keboola/php-csvtable.git
cd php-csvtable
docker-compose build
docker-compose run --rm dev composer install --no-scripts
Run the test suite using this command:
docker-compose run --rm dev composer tests
License
MIT licensed, see LICENSE file.