PHPackages                             lazyeight/ditesto - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. lazyeight/ditesto

ActiveLibrary

lazyeight/ditesto
=================

Object Oriented library to manipulate text files with PHP

v4.0.0(8y ago)018MITPHPPHP &gt;=7

Since Apr 10Pushed 8y ago2 watchersCompare

[ Source](https://github.com/victormech/ditesto)[ Packagist](https://packagist.org/packages/lazyeight/ditesto)[ RSS](/packages/lazyeight-ditesto/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

DiTesto
=======

[](#ditesto)

[![Build Status](https://camo.githubusercontent.com/1ebe33d13b0fa4a1d7f0b1b53588415cdc34303952b101d219fac0ab6b15b350/68747470733a2f2f7472617669732d63692e6f72672f766963746f726d6563682f6469746573746f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/victormech/ditesto) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/a0889411cc8c0c6be8f531464cd1c70860c0013c8fd7b849c1d6ad6f14c364eb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f766963746f726d6563682f6469746573746f2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/victormech/ditesto/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/c67e0435da571ab0dc42360d63e963b8424b065d420eeba46749b75ed22833c5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f766963746f726d6563682f6469746573746f2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/victormech/ditesto/?branch=master) [![Codacy Badge](https://camo.githubusercontent.com/2918ea3f060ca662769ce48764b82b98bedfede7068f250c2c448c4ff9b43e9d/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f67726164652f3130373263623462636332383436613138646565643736343564316231386331)](https://www.codacy.com/app/victormech/ditesto) [![Latest Stable Version](https://camo.githubusercontent.com/e121c7d6212b9647212a537706bcb6ccf9c27663426720735682dd52e65b7590/68747470733a2f2f706f7365722e707567782e6f72672f6c617a7965696768742f6469746573746f2f762f737461626c65)](https://packagist.org/packages/lazyeight/ditesto)

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

[](#a-simple-object-oriented-library-to-load-and-manipulate-text-files-made-using-only-php)

PHP minimum version: 7

Usage
-----

[](#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
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/victormech/basic-types/blob/master/LICENSE) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 98.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~112 days

Recently: every ~140 days

Total

6

Last Release

3117d ago

Major Versions

v1.0.1 → v2.0.02017-08-22

v2.1.0 → v3.0.02017-09-06

v3.0.0 → v4.0.02017-10-26

PHP version history (2 changes)v1.0.0PHP &gt;=5.6.0

v2.0.0PHP &gt;=7

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff944e32c70454ccbebaf95fa332b574a36de126557bcef26f064379f02f3830?d=identicon)[victormech](/maintainers/victormech)

---

Top Contributors

[![victormech](https://avatars.githubusercontent.com/u/685345?v=4)](https://github.com/victormech "victormech (79 commits)")[![victorvox](https://avatars.githubusercontent.com/u/18052554?v=4)](https://github.com/victorvox "victorvox (1 commits)")

---

Tags

object-orientedphptextfilefilestextoo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lazyeight-ditesto/health.svg)

```
[![Health](https://phpackages.com/badges/lazyeight-ditesto/health.svg)](https://phpackages.com/packages/lazyeight-ditesto)
```

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.1k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M788](/packages/league-flysystem-aws-s3-v3)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[league/flysystem-local

Local filesystem adapter for Flysystem.

226231.8M39](/packages/league-flysystem-local)[soundasleep/html2text

A PHP script to convert HTML into a plain text format

48419.5M74](/packages/soundasleep-html2text)[mikehaertl/php-tmpfile

A convenience class for temporary files

9729.7M20](/packages/mikehaertl-php-tmpfile)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
