2017 © Pedro Peláez
 

library streams

Another abstraction over output

image

smt/streams

Another abstraction over output

  • Tuesday, August 11, 2015
  • by smt
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

smt/streams

Another abstraction over output., (*1)

Key-features

Redirecting to another stream., (*2)

Installation

composer require smt/streams

Usage

use Smt\Streams\SymfonyOutputStream;
use Smt\Streams\FileStream;
use Smt\Streams\DummyStream;

$outStream = new SymfonyOutputStream($out);
$outStream
    ->write('Hello')
    ->redirect(new FileStream('truth.txt'))
    ->write('Time')
    ->write(' to')
    ->write(' take')
    ->write(' over')
    ->write(' the')
    ->setRedirectMode(FileStream::WRITE_REDIRECT)
    ->writeln('world')
;
// Symfony out - "Hello world"
// truth.txt - "Time to take over the world"

The Versions

11/08 2015

dev-develop

dev-develop https://github.com/saksmt/php-streams

Another abstraction over output

  Sources   Download

MIT

The Requires

 

file cli symfony stream

11/08 2015

v1.0.0

1.0.0.0 https://github.com/saksmt/php-streams

Another abstraction over output

  Sources   Download

MIT

The Requires

 

file cli symfony stream