PHP Classes

File: src/Generics/Streams/Interceptor/StreamInterceptor.php

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

Contents

Class file image Download
<?php
/**
 * This file is part of the PHP Generics package.
 *
 * @package Generics
 */
namespace Generics\Streams\Interceptor;

/**
 * This interface describes a stream interceptor
 *
 * @author Maik Greubel <greubel@nkey.de>
 */
interface StreamInterceptor
{

   
/**
     * Applies the filter
     *
     * @param resource $in
     * @param resource $out
     * @param int $consumed
     * @param bool $closing
     * @return int
     */
   
public function filter($in, $out, int &$consumed, bool $closing): int;

   
/**
     * Called when closing the filter
     */
   
public function onClose();

   
/**
     * Called when creating the filter
     */
   
public function onCreate();

   
/**
     * Retrieve filter name
     *
     * @return string
     */
   
public function getFilterName(): string;

   
/**
     * Reset filter
     */
   
public function reset();
}