Converts strings to the right encoding in incoming and outgoing packets.
This plugin can be deactivated if all three tiers (DB, PHP, client) use the same charset, usually utf8. This works for nested objects.
package | Amfphp_Plugins_CharsetConverter |
---|---|
author | Ariel Sommeria-Klein |
__construct(array $config)
array
optional key/value pairs in an associative array. Used to override default configuration values.
convertStringFromClientToPhpCharsets(mixed $obj) : mixed
Rather the recursion is handled by Amfphp_Core_Amf_Util::applyFunctionToContainedObjects. must be public so that Amfphp_Core_Amf_Util::applyFunctionToContainedObjects can call it
mixed
mixed
convertStringFromPhpToClientCharsets(mixed $obj) : mixed
Rather the recusrion is handled by Amfphp_Core_Amf_Util::applyFunctionToContainedObjects. must be public so that Amfphp_Core_Amf_Util::applyFunctionToContainedObjects can call it
mixed
mixed
filterDeserializedRequest(mixed $deserializedRequest) : mixed
Loads the class if necessary
mixed
mixed
filterDeserializedResponse(mixed $deserializedResponse) : mixed
mixed
mixed
transliterate(String $string, int $direction) : String
finds the proper encoding depending on direction
String
data to convert
int
one of the DIRECTION_XXX consts described above
String
$clientCharset : String
default utf-8 See all the possible codepages for iconv here: http://www.gnu.org/software/libiconv/
$method : String
One of the METHOD_XXX consts defined above.
$phpCharset : String
See all the possible codepages for iconv here: http://www.gnu.org/software/libiconv/
DIRECTION_CLIENT_TO_PHP
DIRECTION_PHP_TO_CLIENT
METHOD_ICONV
METHOD_MBSTRING
METHOD_NONE
METHOD_RECODE
METHOD_UTF8_DECODE