承接 intriro/csv-bundle 相关项目开发

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

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

intriro/csv-bundle

最新稳定版本:v1.1.0

Composer 安装命令:

composer require intriro/csv-bundle

包简介

Integration of Goodby CSV into Symfony2

README 文档

README

Latest Stable Version Total Downloads License

Provides integration of the goodby/csv library into Symfony.

About Goodby CSV

Goodby CSV is a high memory efficient flexible and extendable open-source CSV import/export library for PHP.

Documentation is available here.

Installation

This bundle can be installed using composer by adding the following in the require section of your composer.json file:

{
    "require": {
        "intriro/csv-bundle": "^1.0"
    }
}

Register the bundle

You must register the bundle in your kernel:

<?php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(

        // ...

        new Intriro\Bundle\CsvBundle\IntriroCsvBundle(),
    );

    // ...
}

Configuration

TODO

Configuring importers

# app/config/config.yml
intriro_csv:
    importers:
        foo: ~  # uses the default configuration

        bar:
            delimiter: "\t"         # Customize delimiter. Default value is comma(,)
            enclosure: "'"          # Customize enclosure. Default value is double quotation(")
            escape: "\\"            # Customize escape character. Default value is backslash(\)
            to_charset: UTF-8       # Customize target encoding. Default value is null, no converting.
            from_charset: SJIS-win  # Customize CSV file encoding. Default value is null.

Importers are ment to get data from a CSV file into your PHP code. The defined importers from the sample configuration are available as services in the container as intriro_csv.importer.foo and intriro_csv.importer.bar.

The services are instances of Goodby\CSV\Import\Standard\Lexer.

Configuring exporters

# app/config/config.yml
intriro_csv:
    exporters:
        foo: ~  # uses the default configuration

        bar:
            delimiter: "\t"         # Customize delimiter. Default value is comma(,)
            enclosure: "'"          # Customize enclosure. Default value is double quotation(")
            escape: "\\"            # Customize escape character. Default value is backslash(\)
            to_charset: SJIS-win    # Customize target encoding. Default value is null, no converting.
            from_charset: UTF-8     # Customize CSV file encoding. Default value is null.
            file_mode: w            # Customize file mode and choose either write or append. Default value is write ('w'). See fopen() php docs

The defined exporters from the sample configuration are available as services in the container as intriro_csv.exporter.foo and intriro_csv.exporter.bar.

The services are instances of Goodby\CSV\Export\Standard\Exporter.

License

This bundle is released under the MIT license. See the complete license in the bundle:

src/Resources/meta/LICENSE

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-02