{"id":33978339,"url":"https://github.com/victormech/ditesto","last_synced_at":"2026-05-26T13:03:00.792Z","repository":{"id":57012922,"uuid":"55660674","full_name":"victormech/ditesto","owner":"victormech","description":"Object Oriented library to manipulate text files with PHP","archived":false,"fork":false,"pushed_at":"2017-10-26T04:57:03.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-28T07:53:42.753Z","etag":null,"topics":["object-oriented","php","textfile"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/victormech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-07T03:27:46.000Z","updated_at":"2017-08-23T13:13:05.000Z","dependencies_parsed_at":"2022-08-21T15:10:08.905Z","dependency_job_id":null,"html_url":"https://github.com/victormech/ditesto","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/victormech/ditesto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victormech%2Fditesto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victormech%2Fditesto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victormech%2Fditesto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victormech%2Fditesto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victormech","download_url":"https://codeload.github.com/victormech/ditesto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victormech%2Fditesto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33521333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["object-oriented","php","textfile"],"created_at":"2025-12-13T02:48:33.353Z","updated_at":"2026-05-26T13:03:00.786Z","avatar_url":"https://github.com/victormech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DiTesto\n[![Build Status](https://travis-ci.org/victormech/ditesto.svg?branch=master)](https://travis-ci.org/victormech/ditesto) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/victormech/ditesto/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/victormech/ditesto/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/victormech/ditesto/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/victormech/ditesto/?branch=master) [![Codacy Badge](https://api.codacy.com/project/badge/grade/1072cb4bcc2846a18deed7645d1b18c1)](https://www.codacy.com/app/victormech/ditesto) [![Latest Stable Version](https://poser.pugx.org/lazyeight/ditesto/v/stable)](https://packagist.org/packages/lazyeight/ditesto)\n\n##### A simple Object Oriented library to load and manipulate text files. Made using only PHP.\nPHP minimum version: 7\n\n## Usage\n```php\n$file = '/home/user/text-file.txt';\n$fileSystem = new FileSystemHandler($file);\n$textFile = new TextFile($file); \n\n(new FileReader($textFile, $fileSystem))-\u003ereadFile();\necho $textFile; // prints all file content\n```\nYou can iterate line per line if you want:\n```php\n$textFile = new TextFile($file); \n$fileSystem = new FileSystemHandler($file);\n(new FileReader($textFile, $fileSystem))-\u003ereadFile());\n\nforeach ($textFile as $line) {\n   echo $line;\n}\n```\nOr even like an Array:\n```php\n$textFile[] = new Line('Adding a new line');\n$textFile[0] = new Line('Changing an existent line');\necho count($textFile); // prints total of lines\necho $textFile[1]; // prints only the second line \n```\nTo persist the file changes:\n```php\n$textFile = new TextFile($file); \n$fileSystem = new FileSystemHandler($file);\n(new FileWriter($textFile, $fileSystem))-\u003ewriteFile();\n```\n## License\n  \nThe MIT License (MIT). Please see [License File](https://github.com/victormech/basic-types/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictormech%2Fditesto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictormech%2Fditesto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictormech%2Fditesto/lists"}