system/io/OutputStream.php

Show: inherited
Table of Contents

Wrapper class for PHP stream that supports write operations.

Package
phing.system.io  

\OutputStream

Package: phing\system\io

Wrapper class for PHP stream that supports write operations.

Children
\FileOutputStream

Properties

Propertyprotectedresource  $stream= ''

The configured PHP stream.
Details
Type
resource

Methods

methodpublic__construct( resource $stream ) : void

Construct a new OutputStream.

Parameters
Name Type Description
$stream resource

Configured PHP stream for writing.

methodpublic__toString( ) : string

Returns a string representation of the attached PHP stream.

Returns
Type Description
string
methodpublicclose( ) : void

Closes attached stream, flushing output first.

Throws
Exception Description
\IOException if cannot close stream (note that attempting to close an already closed stream will not raise an IOException)
methodpublicflush( ) : void

Flushes stream.

Throws
Exception Description
\IOException if unable to flush data (e.g. stream is not open).
methodpublicwrite( string $buf, int $off = null, int $len = null ) : void

Writes data to stream.

Parameters
Name Type Description
$buf string

Binary/character data to write.

$off int

(Optional) offset.

$len int

(Optional) number of bytes/chars to write.

Throws
Exception Description
\IOException - if there is an error writing to stream
Documentation was generated by DocBlox 0.18.1.