2017 © Pedro Peláez
 

library ditesto

Object Oriented library to manipulate text files with PHP

image

lazyeight/ditesto

Object Oriented library to manipulate text files with PHP

  • Thursday, October 26, 2017
  • by victormech
  • Repository
  • 2 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

DiTesto

Build Status Scrutinizer Code Quality Code Coverage Codacy Badge Latest Stable Version, (*1)

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

PHP minimum version: 7, (*2)

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:, (*3)

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

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

Or even like an Array:, (*4)

$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:, (*5)

$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., (*6)

The Versions

26/10 2017

dev-master

9999999-dev

Object Oriented library to manipulate text files with PHP

  Sources   Download

MIT

The Requires

  • php >=7

 

The Development Requires

by Victor Ribeiro

files text oo

26/10 2017

v4.0.0

4.0.0.0

Object Oriented library to manipulate text files with PHP

  Sources   Download

MIT

The Requires

  • php >=7

 

The Development Requires

by Victor Ribeiro

files text oo

06/09 2017

v3.0.0

3.0.0.0

Object Oriented library to manipulate text files with PHP

  Sources   Download

MIT

The Requires

  • php >=7

 

The Development Requires

by Victor Ribeiro

files text oo

06/09 2017

dev-adding-more-solid-principles

dev-adding-more-solid-principles

Object Oriented library to manipulate text files with PHP

  Sources   Download

MIT

The Requires

  • php >=7

 

The Development Requires

by Victor Ribeiro

files text oo

22/08 2017

v2.1.0

2.1.0.0

Object Oriented library to manipulate text files with PHP

  Sources   Download

MIT

The Requires

  • php >=7

 

The Development Requires

by Victor Ribeiro

files text oo

22/08 2017

v2.0.0

2.0.0.0

Object Oriented library to manipulate text files with PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Ribeiro

files text oo

15/05 2017

dev-upgrade-to-php7

dev-upgrade-to-php7

Object Oriented library to manipulate text files with PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Ribeiro

files text oo

10/04 2016

v1.0.1

1.0.1.0

Object Oriented library to load and manipulate text files with PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Ribeiro

files text oo

10/04 2016

v1.0.0

1.0.0.0

Object Oriented library to load and manipulate text files with PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Ribeiro

files text oo