mfajfr / tarsago-export
Put data into csv files and export them to SFTP
Installs: 100
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
pkg:composer/mfajfr/tarsago-export
Requires
- fzaninotto/faker: ^1.9
- phpseclib/phpseclib: ^2.0
README
Installation
composer require mfajfr/tarsago-export
Using
Creating row
Row represents order from telemarketing etc.
$row = new \TarsagoExport\Models\Telemarketing\Row($param1, $param2, ...); // implements IRow
Creating transaction
Transaction represents list of rows (orders) from one day or specific period
$transaction = new \TarsagoExport\Models\Telemarketing\Transaction(); // implements ITransaction $transaction->addRow($row); // Adding rows
Uploading (to SFTP)
$exporter = new \TarsagoExport\Exporters\SFTPExporter($ip, new \TarsagoExport\Credentials\UserPasswordCredentials($username, $password)); $exporter->upload('/path/to/file.csv', $transaction);