msrana/yocsv 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

msrana/yocsv

Composer 安装命令:

composer require msrana/yocsv

包简介

CSV easy import and export with php

关键字:

README 文档

README

YoCsv is a simple php package to manipulate csv files and apply query on it's data like php-jsonq. This package also allow you to transform your expected data.

Installation

Just add this package to your composer.json file to write this command.

composer require msrana/yocsv

Quick usage to read a csv file

Just create an instance of Csv class and pass an argument of file path string. Then call the get() method to get data like example below

use MsRana\YoCsv\Csv;
$csv = new Csv("../source/school.csv") // use right path name to ignore `FileNotFoundException`
$data = $csv->get(); // you will get all row as array

Please don't forget to add vendor/autoload.php file.

Or you can instantiate without passing any argument on constractor in this way you have to call read or import method with a argument as file path.

use MsRana\YoCsv\Csv;
$csv = new Csv();
$csv->read("file.csv");
$csv->get(); // return all data row as array

This package also allow you to apply query/filters like as orm. We use php-jsonq package to inherit it's query functionality on csv file. Please read php-jsonq documentation and their apis to apply query on csv :D.

$csv->where('key',$value);
$csv->get(); // show result

Library used

Credit

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固