定制 guiguiboy/simple-file-handler 二次开发

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

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

guiguiboy/simple-file-handler

Composer 安装命令:

composer require guiguiboy/simple-file-handler

包简介

Simple file handler. Uses generators.

README 文档

README

This is a simple library which uses PHP generators to read a file. Think of it as a replacement for the built-in file() function which creates a copy of the file in the memory, thus making it unsuitable for large files.

Getting Started

As long as the FileHandler class is autoloaded, simply:

$streamHandler = new StreamHandler(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'file.txt');

foreach ($streamHandler->getLines() as $line) {
    //Do what you want
}

A check is made in the constructor to ensure provided file path exists. If not, an \InvaliDArgumentException would be thrown.

Prerequisites

  • Composer

Installing

  • Add package to your deps with composer
composer require guiguiboy/simple-file-handler
  • Enjoy

Running the tests

  • Tests
vendor/bin/phpunit tests/

And coding style tests

  • PSR-2 compatibility
vendor/bin/phpcs --standard=psr2 --ignore=vendor .

Contributing

Please, make PR. I'll be happy to review.

Versioning

Authors

  • Guillaume BRETOU

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固