visavi/flystring 问题修复 & 功能扩展

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

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

visavi/flystring

最新稳定版本:v1.2

Composer 安装命令:

composer require visavi/flystring

包简介

System control data are stored in text format

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

Basic useful feature list:

  • Reading and retrieval of data in a text file
  • Adding and deleting rows
  • Shift, rotation, clear and moving strings
  • Verifying the existence and size of the output file
  • Suitable for working with CSV format
<?php
// Pass the file name and separator (default |)
$fly = new Visavi\FlyString('test.txt', '|');

// Checks the existence of the line returns true or false
$string = $fly->exists();

// Returns the number of lines in the file, if the file does not exist returns 0
$string = $fly->count();

// Adding lines to the file, if the file does not exist it will be created, line is added to the file
$fly->insert(['hello', 'world', 'test', 555]);

// Add a line to the beginning of the file
$fly->insert([0, 'The line at the beginning of the', 'something'], false);

// Reading the first line of the file, Default shows the last line in the file
$string = $fly->read(0);

// Search the data in cell number 2, it returns an array of the entire row and line number
$string = $fly->search(2, 'test');

// Change the value in the line number 8 and the cell number 2
$fly->cell(8, 2, 'new value');

// Writes a string number 5 new data
$fly->update(5, ['hello', 'world', 'test', 555]);

// Line breaks down the file number 3, if no number is transferred to a null string
$fly->down(3);

// Shift 7 line 1 position up, then there would be 7 line 6 and vice versa
$fly->shift(7, -1);

// Deleting rows from a file, instead of an array can be passed an integer
$string = $fly->delete([1, 2]);

// Rewrites the entire file when the file does not exist, create it
$fly->write('new file');

// Displays formatted file size, such as 543B, 1.43kB
$fly->filesize();

// Clears file
$fly->clear();

Installing

composer require visavi/flystring

License

The class is open-sourced software licensed under the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-16