Skip to content
This repository was archived by the owner on Nov 15, 2019. It is now read-only.

Repository files navigation

Arrounded/extractors

Build StatusLatest Stable VersionTotal DownloadsScrutinizer Quality ScoreCode Coverage

Install

Via Composer

$ composer require arrounded/extractors

Usage

The idea is that you extend the existing extractors, which provide the minimal functionality, and tweak it for your use case.

For example (using the CsvExtractor)

class MyExtractor extends CsvExtractor {
publicfunctiongetData(array$data = [])
{
// $data contains the entire content of a row in the CSV// You can return whatever you need from the row.return$data;
}
}
// Using the extractor$extractor = newMyExtractor();
$extractor->setFixture('path/to/data.csv');
$extractor->run(function ($data) {
// $data contains whatever is the output of `MyExtractor::getData()`.// Persist in database
});

Testing

$ composer test

License

The MIT License (MIT). Please see License File for more information.

About

arrounded/extractors

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages