承接 traderinteractive/column-parser 相关项目开发

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

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

traderinteractive/column-parser

Composer 安装命令:

composer require traderinteractive/column-parser

包简介

A library that parses columnar data from a string, e.g. from CLI output.

README 文档

README

Build Status Scrutinizer Code Quality Coverage Status

Latest Stable Version Latest Unstable Version License

Total Downloads Daily Downloads Monthly Downloads

A PHP library that parses columnar data from a string, e.g. from CLI output.

Requirements

This library requires PHP 7.0, or newer.

Installation

This package uses composer so you can just add traderinteractive/column-parser as a dependency to your composer.json file.

composer require traderinteractive/column-parser

Formats Supported

This library parses input that has to conform to a supported format.

Multispaced Headers

This parses a string where there are at least two spaces between the columns. The first line in the string is the headers. Each header is expected to be separated by at least two spaces. A single space is treated as interior space of the header (i.e. multiple-word headers).

Example

For example, given the following $contents:

Name     Age  City of Birth
James    17   San Francisco, CA
Mary     18   Washington, D.C.
William  22   Dallas, TX

and the following code:

$parser = new MultispacedHeadersParser($contents);
$data = $parser->getRows();

would result in $data containing:

array(
    array(
        'Name' => 'James',
        'Age' => '17',
        'City of Birth' => 'San Francisco, CA',
    ),
    array(
        'Name' => 'Mary',
        'Age' => '18',
        'City of Birth' => 'Washington, D.C.',
    ),
    array(
        'Name' => 'William',
        'Age' => '22',
        'City of Birth' => 'Dallas, TX',
    ),
);

Contributing

If you would like to contribute, please use our build process for any changes and after the build passes, send us a pull request on github!

./vendor/bin/phpunit
./vendor/bin/phpcs

There is also a docker-based fig configuration that will execute the build inside a docker container. This is an easy way to build the application:

fig run build

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 22
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固