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
$callback
private
callable(string, mixed): string|null
$callback
$filters
private
static array<string, callable(string, mixed): string>
$filters
= []
Methods
callback()
Returns the closure attached to the filtername.
public
static callback(string $filtername) : callable(string, mixed): string
Parameters
- $filtername : string
Tags
Return values
callable(string, mixed): stringfilter()
public
filter(mixed $in, mixed $out, mixed &$consumed, bool $closing) : int
Parameters
- $in : mixed
- $out : mixed
- $consumed : mixed
- $closing : bool
Return values
intisRegistered()
Tells whether a callback with the given name is already registered or not.
public
static isRegistered(string $filtername) : bool
Parameters
- $filtername : string
Return values
boolonClose()
public
onClose() : void
onCreate()
public
onCreate() : bool
Return values
boolregister()
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