StreamConverter extends php_user_filter
Table of Contents
Constants
- FILTER_IDENTIFIER = 'bx.localization.converter'
Methods
- filter() : int
- include() : mixed
- Loads php file with realtime encoding convention.
- register() : bool
- Registers stream filter.
Constants
FILTER_IDENTIFIER
public
mixed
FILTER_IDENTIFIER
= 'bx.localization.converter'
Methods
filter()
public
filter(resource $in, resource $out, int &$consumed, bool $closing) : int
Parameters
- $in : resource
-
is a resource pointing to a bucket brigade which contains one or more bucket objects containing data to be filtered.
- $out : resource
-
is a resource pointing to a second bucket brigade into which your modified buckets should be placed.
- $consumed : int
-
which must always be declared by reference, should be incremented by the length of the data which your filter reads in and alters. In most cases this means you will increment consumed by $bucket->datalen for each $bucket.
- $closing : bool
-
If the stream is in the process of closing (and therefore this is the last pass through the filterchain), the closing parameter will be set to TRUE.
Tags
Return values
intinclude()
Loads php file with realtime encoding convention.
public
static include(string $langPath, string $lang[, string $targetEncoding = '' ][, string $sourceEncoding = '' ]) : mixed
Parameters
- $langPath : string
-
File path to include.
- $lang : string
-
Source language.
- $targetEncoding : string = ''
-
Target encoding.
- $sourceEncoding : string = ''
-
Source encoding.
register()
Registers stream filter.
public
static register() : bool