承接 arrounded/extractors 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

arrounded/extractors

Composer 安装命令:

composer require arrounded/extractors

包简介

An abstraction layer to extract data from various sources

README 文档

README

Build Status Latest Stable Version Total Downloads Scrutinizer Quality Score Code 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 {

   public function getData(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 = new MyExtractor();
$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.

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-22