zebba/loader
最新稳定版本:1.0.5
Composer 安装命令:
composer require zebba/loader
包简介
Zebba Loader Component
README 文档
README
Installation
Modify your composer.json:
{
"require" : {
"zebba/loader" : "1.*"
}
}
Usage
Parsing CSV files
<?php $csv = "key1;key2\r\nvalue1;2\r\nvalue2;3"; // $csv = new \SplFileInfo(...); try { $output = Csv::parse($csv); } catch (\Zebba\Component\Loader\Exception\ParseException $e) { throw $e; } /* * $output = array( * array( * 'key1' => 'value1', * 'key2' => 2, * ), array( * key1' => 'value2', * 'key2' => 3, * ) * ); */
Dumping arrays to CSV files
<?php <?php $input = array( array( 'key1' => 'value1', 'key2' => 2, ), array( 'key1' => 'value2', 'key2' => 3, ) ); $csv = Csv::dump($input); // $csv = "key1;key2\r\nvalue1;2\r\nvalue2;3";
统计信息
- 总下载量: 103
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-02