Documentation

CallbackStreamFilter extends php_user_filter
in package

FinalYes

Table of Contents

Properties

$callback  : callable(string, mixed): string|null
$filters  : array<string, callable(string, mixed): string>

Methods

callback()  : callable(string, mixed): string
Returns the closure attached to the filtername.
filter()  : int
isRegistered()  : bool
Tells whether a callback with the given name is already registered or not.
onClose()  : void
onCreate()  : bool
register()  : void
Static method to register the class as a stream filter.
registeredFilternames()  : array<string|int, string>
Returns the list of registered filters.
normalizeCallback()  : callable(string, mixed): string

Properties

Methods

callback()

Returns the closure attached to the filtername.

public static callback(string $filtername) : callable(string, mixed): string
Parameters
$filtername : string
Tags
throws
OutOfBoundsException

if no callback is attached to the filter name

Return values
callable(string, mixed): string

filter()

public filter(mixed $in, mixed $out, mixed &$consumed, bool $closing) : int
Parameters
$in : mixed
$out : mixed
$consumed : mixed
$closing : bool
Return values
int

isRegistered()

Tells whether a callback with the given name is already registered or not.

public static isRegistered(string $filtername) : bool
Parameters
$filtername : string
Return values
bool

register()

Static method to register the class as a stream filter.

public static register(string $filtername, callable(string, mixed): string $callback) : void
Parameters
$filtername : string
$callback : callable(string, mixed): string

registeredFilternames()

Returns the list of registered filters.

public static registeredFilternames() : array<string|int, string>
Return values
array<string|int, string>

normalizeCallback()

private static normalizeCallback(callable(string, mixed): string $callback) : callable(string, mixed): string
Parameters
$callback : callable(string, mixed): string
Tags
throws
ReflectionException|ValueError
Return values
callable(string, mixed): string

        
On this page

Search results