Overview

Namespaces

  • Webmozart
    • Console
      • Adapter
      • Api
        • Application
        • Args
          • Format
        • Command
        • Config
        • Event
        • Formatter
        • IO
        • Resolver
      • Args
      • Config
      • Formatter
      • Handler
        • Help
      • IO
        • InputStream
        • OutputStream
      • Process
      • Resolver
      • UI
        • Alignment
        • Component
        • Help
        • Layout
        • Style
      • Util

Classes

  • BufferedOutputStream
  • ErrorOutputStream
  • NullOutputStream
  • StandardOutputStream
  • StreamOutputStream
  • Overview
  • Namespace
  • Class

Class StreamOutputStream

An output stream that writes to a PHP stream.

Webmozart\Console\IO\OutputStream\StreamOutputStream implements Webmozart\Console\Api\IO\OutputStream

Direct known subclasses

Webmozart\Console\IO\OutputStream\ErrorOutputStream, Webmozart\Console\IO\OutputStream\StandardOutputStream
Namespace: Webmozart\Console\IO\OutputStream
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
Located at IO/OutputStream/StreamOutputStream.php
Methods summary
public
# __construct( resource $stream )

Creates the stream.

Creates the stream.

Parameters

$stream
A stream resource.
public
# write( string $string )

Writes a string to the stream.

Writes a string to the stream.

Parameters

$string
The string to write.

Throws

Webmozart\Console\Api\IO\IOException
If writing fails or if the stream is closed.

Implementation of

Webmozart\Console\Api\IO\OutputStream::write()
public
# flush( )

Flushes the stream and forces all pending text to be written out.

Flushes the stream and forces all pending text to be written out.

Throws

Webmozart\Console\Api\IO\IOException
If flushing fails or if the stream is closed.

Implementation of

Webmozart\Console\Api\IO\OutputStream::flush()
public boolean
# supportsAnsi( )

Returns whether the stream supports ANSI format codes.

Returns whether the stream supports ANSI format codes.

Returns

boolean

Returns true if the stream supports ANSI format codes and false otherwise.

Implementation of

Webmozart\Console\Api\IO\OutputStream::supportsAnsi()
public
# close( )

Closes the stream.

Closes the stream.

Implementation of

Webmozart\Console\Api\IO\OutputStream::close()
public boolean
# isClosed( )

Returns whether the stream is closed.

Returns whether the stream is closed.

Returns

boolean
Returns true if the stream is closed.

Implementation of

Webmozart\Console\Api\IO\OutputStream::isClosed()
Webmozart Console API API documentation generated by ApiGen