定制 pavlyuts/php-csv-objects 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

pavlyuts/php-csv-objects

最新稳定版本:0.1.2

Composer 安装命令:

composer require pavlyuts/php-csv-objects

包简介

Handle CSV complex multi-string objects

README 文档

README

Purpose

There a lot of scenarions for CSV format used to export/import structured documents with more complex structure: some of fields are document-level and repeated each row and other fields are row-level. The most common example is an invoice: Customer ID and name, billing address and other header-level fields are repeating each row while other columns contains invoice rows data like sell item, quantity and price.

The idea behing the library is to provide easy and configurable gear to handle this kind of "structured CSV", based on "profile", describig CSV file structures and handling rules.

So, with this lib you need at least:

  • Create CSV "profile" data structure to define processing rules
  • Create collecton from file and got an array of class instances, representing the CSV encoded entities

In a simple case you need no extra code. For more complex scenarios you may extent Entity class with your features or add field processing functions

  • Create a subclass of Entity to do extra handling on your 'documents'
  • Create custome field classes for sophisticated validation and processing on export and import

See details and docs in Wiki

Installation

In the Composer storage. Just add proper require section:

"require": {
    "pavlyuts/csv-objects": "^0.1"
}

It is a good idea to fix at least major version you use. Don't use next version without review, I can't promose backward compatibility even will try to keep it. Please, review the changelog before to change used version.

Dependencies

  • psr/log: ^1.1
  • rmccue/requests: ^1.7

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2023-02-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固