承接 lazyeight/ditesto 相关项目开发

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

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

lazyeight/ditesto

Composer 安装命令:

composer require lazyeight/ditesto

包简介

Object Oriented library to manipulate text files with PHP

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage Codacy Badge Latest Stable Version

A simple Object Oriented library to load and manipulate text files. Made using only PHP.

PHP minimum version: 7

Usage

$file = '/home/user/text-file.txt';
$fileSystem = new FileSystemHandler($file);
$textFile = new TextFile($file); 

(new FileReader($textFile, $fileSystem))->readFile();
echo $textFile; // prints all file content

You can iterate line per line if you want:

$textFile = new TextFile($file); 
$fileSystem = new FileSystemHandler($file);
(new FileReader($textFile, $fileSystem))->readFile());

foreach ($textFile as $line) {
   echo $line;
}

Or even like an Array:

$textFile[] = new Line('Adding a new line');
$textFile[0] = new Line('Changing an existent line');
echo count($textFile); // prints total of lines
echo $textFile[1]; // prints only the second line 

To persist the file changes:

$textFile = new TextFile($file); 
$fileSystem = new FileSystemHandler($file);
(new FileWriter($textFile, $fileSystem))->writeFile();

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固