\FACTFinder\CoreIConvEncodingConverter

Implements the AbstractEncodingConverter using the iconv module.

This abstract class does not specify how the actual conversion of a single string is done. Create a subclass to implement the conversion method. Also note that none of these methods handle URL en- or decoding but only deal with plain character encodings.

Summary

Methods
Properties
Constants
__construct()
encodeContentForPage()
decodeClientUrlData()
encodeClientUrlData()
No public properties found
LIBRARY_ENCODING
convertString()
convert()
convert_recursive()
$pageContentEncoding
$clientUrlEncoding
N/A
No private methods found
$log
N/A

Constants

LIBRARY_ENCODING

LIBRARY_ENCODING

Properties

$pageContentEncoding

$pageContentEncoding : string

Type

string

$clientUrlEncoding

$clientUrlEncoding : string

Type

string

$log

$log : \FACTFinder\Core\FACTFinder\Util\LoggerInterface

Type

\FACTFinder\Core\FACTFinder\Util\LoggerInterface

Methods

__construct()

__construct(string  $loggerClass, \FACTFinder\Core\ConfigurationInterface  $configuration) 

Parameters

string $loggerClass

Class name of logger to use. The class should implement FACTFinder\Util\LoggerInterface.

\FACTFinder\Core\ConfigurationInterface $configuration

Configuration object to use.

encodeContentForPage()

encodeContentForPage(mixed  $data) : mixed

Converts data held by the library for use on the rendered page.

Hence, it converts from the library's encoding (UTF-8) to the configured page content encoding.

Parameters

mixed $data

Could either be a string or an associative array.

Returns

mixed

decodeClientUrlData()

decodeClientUrlData(mixed  $data) : mixed

Converts data obtained from the client URL for use within the library.

Hence, it converts from the configured client URL encoding to the library's encoding (UTF-8).

Parameters

mixed $data

Data obtained from the client URL. Note that this data should already be URL decoded. Could either be a string or an associative array.

Returns

mixed

encodeClientUrlData()

encodeClientUrlData(mixed  $data) : mixed

Converts data held by the library for use in a client URL.

Hence, it converts from the configured client URL encoding to the library's encoding (UTF-8).

Parameters

mixed $data

Data to be used in the client URL. Note that this data should not yet be URL encoded. Could either be a string or an associative array.

Returns

mixed

convertString()

convertString(  $inCharset,   $outCharset,   $string) 

Parameters

$inCharset
$outCharset
$string

convert()

convert(  $inCharset,   $outCharset, mixed  $data) : mixed

Converts data from $inCharset to $outCharset.

Parameters

$inCharset
$outCharset
mixed $data

If a string is given, it's encoding will be converted. If an associative array is given, keys and values will be converted recursively. All other data types will be returned unchanged.

Returns

mixed

convert_recursive()

convert_recursive(  $inCharset,   $outCharset, mixed  $data) : mixed

Converts data from $inCharset to $outCharset.

Parameters

$inCharset
$outCharset
mixed $data

If a string is given, it's encoding will be converted. If an associative array is given, keys and values will be converted recursively. All other data types will be returned unchanged.

Returns

mixed