php-extended / php-io
Classes to implement generic input and output operations
This package's canonical repository appears to be gone and the package has been frozen as a result.
1.2.1
2019-11-30 09:37 UTC
This package is auto-updated.
Last update: 2020-03-01 00:07:10 UTC
README
Classes to implement generic input and output operations
Installation
The installation of this library is made via composer.
Download composer.phar
from their website.
Then add to your composer.json :
"require": {
...
"php-extended/php-io": "^1.0",
...
}
Then run php composer.phar update
to install this library.
The autoloading of all classes of this library is made through composer's autoloader.
Basic Usage
For the output stream:
use PhpExtended\Io\ConsoleOutputStream;
$console = new ConsoleOutputStream();
$console->writeln('<your string here>'); // equivalent to echo '<your string>'."\n";
For the input stream:
use PhpExtended\Io\ConsoleInputStream;
$console = new ConsoleInputStream();
$input = $console->readline(); // equivalent to readline();
License
MIT (See license file).