Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hotelmah/write-file

Write File is a rudimentary PHP write a file to disk class. Data can be added incrementally which can then be written at once to a file. This library is used by the MySQL Table Editor project.
https://github.com/hotelmah/write-file

Last synced: 13 days ago
JSON representation

Write File is a rudimentary PHP write a file to disk class. Data can be added incrementally which can then be written at once to a file. This library is used by the MySQL Table Editor project.

Awesome Lists containing this project

README

        

## About
This library/package has a saveData method that can add data incrementally or at once into memory which can then be written at once to a file using the write method. This library is used by the MySQL Table Editor (MTE) project referenced [here](https://github.com/hotelmah/mysql-table-editor).

## Notice
- This package is rudimentary and not meant for widespread use. If you would like me to further develop this class to be more robust, please open an issue or discussion. Thank you.

## Files Not Included in Packagist Package
- *.gitattributes*
- *WriteFile-Test-1.php*

## Test File
- *WriteFile-Test-1.php*
- This is a sample of how the package works.

## In your Script
- Add the following (see the test file for an example):

`
require_once('vendor/autoload.php');
`

`
use WriteFile\ClsWriteFile;
`

## Installation - Composer
- run this command in your project root:

`
composer require hotelmah/write-file
`

- There is no need to manually create/update a composer.json file in your project root since this command does it automatically.
- The package is listed on Packagist, but is hosted on GitHub where the source is pulled from.

## Installation - Manual
- Copy the src directory contents to an appropriately named directory like includes/ in your LAMP web hosting provider.
- Refer to the 'In your Script' heading above and/or test file.

## Feedback
- Forks and Pull Requests are welcomed.
- Suggestions and comments for improvement are requested.
- Thank you for reading!

## License
- GNU GENERAL PUBLIC LICENSE, Version 3.