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

  • Input
  • IO
  • Output

Interfaces

  • InputStream
  • OutputStream

Exceptions

  • IOException
  • Overview
  • Namespace
  • Class

Interface InputStream

The console input stream.

Direct known implementers

Webmozart\Console\IO\InputStream\NullInputStream, Webmozart\Console\IO\InputStream\StreamInputStream

Indirect known implementers

Webmozart\Console\IO\InputStream\StandardInputStream, Webmozart\Console\IO\InputStream\StringInputStream
Namespace: Webmozart\Console\Api\IO
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
Located at Api/IO/InputStream.php
Methods summary
public string
# read( integer $length )

Reads the given amount of characters from the stream.

Reads the given amount of characters from the stream.

Parameters

$length
The number of characters to read.

Returns

string
The characters read from the stream.

Throws

Webmozart\Console\Api\IO\IOException
If reading fails or if the stream is closed.
public string
# readLine( integer $length = null )

Reads a line from the stream.

Reads a line from the stream.

Parameters

$length

The maximum number of characters to read. If null, all characters up to the first newline are returned.

Returns

string
The characters read from the stream.

Throws

Webmozart\Console\Api\IO\IOException
If reading fails or if the stream is closed.
public
# close( )

Closes the stream.

Closes the stream.

public boolean
# isClosed( )

Returns whether the stream is closed.

Returns whether the stream is closed.

Returns

boolean
Returns true if the stream is closed.
Webmozart Console API API documentation generated by ApiGen