PHP Classes

File: src/Generics/Streams/OutputStream.php

Recommend this page to a friend!
  Classes of Maik Greubel   PHP Generics   src/Generics/Streams/OutputStream.php   Download  
File: src/Generics/Streams/OutputStream.php
Role: Class source
Content type: text/plain
Description: Output stream interface
Class: PHP Generics
Framework for accessing streams, sockets and logs
Author: By
Last change: Update of src/Generics/Streams/OutputStream.php
Date: 6 months ago
Size: 801 bytes
 

Contents

Class file image Download
<?php

/**
 * This file is part of the PHP Generics package.
 *
 * @package Generics
 */
namespace Generics\Streams;

/**
 * This interface describes the implementation of an output stream
 *
 * @author Maik Greubel <greubel@nkey.de>
 */
interface OutputStream extends Stream
{

   
/**
     * Write a buffer into stream
     *
     * @param string|InputStream $buffer
     * The buffer to write (or input stream to read out of and then write)
     * @throws StreamException in case of stream is closed
     */
   
public function write($buffer);

   
/**
     * Whether it is possible to write to stream
     *
     * @return bool
     */
   
public function isWriteable():bool;

   
/**
     * Flush the stream
     *
     * @throws StreamException
     */
   
public function flush();
}