An XML-RPC encoder that transparently converts PHP types to their XML-RPC counterpart.
More...
An XML-RPC encoder that transparently converts PHP types to their XML-RPC counterpart.
- Authors
- François Poirotte click.nosp@m.y@er.nosp@m.ebot..nosp@m.net
Definition at line 21 of file NativeEncoder.php.
static fpoirotte\XRL\NativeEncoder::convert |
( |
|
$value | ) |
|
|
static |
Convert the given PHP value to an XML-RPC type.
- Parameters
-
mixed | $value | The PHP value to convert. |
- Return values
-
- Note
- This implementation supports the "nil" XML-RPC extension (http://ontosys.com/xml-rpc/extensions.php).
-
An empty PHP array will always be encoded as an empty XML-RPC array.
-
The following PHP types are currently supported:
null
(encoded using the "nil" XML-RPC type).
- integer (encoded using the "int" XML-RPC type).
- boolean (encoded using the "boolean" XML-RPC type).
- string (encoded using either the default type of XML-RPC [string] or "base64" if the string contains invalid UTF-8 sequences, such as when encoding binary data).
- double (encoded using the "double" XML-RPC type).
- array (encoded using either the "array" or "struct" XML-RPC type). "array" is used for numerically-indexed arrays where the keys are [0..len(array)-1] (aka "list"). "struct" is used for all other arrays (aka "hash"). – DateTime objects (encoded using the "dateTime.iso8601" XML-RPC type).
- objects that support serialization (encoded as an XML-RPC "string", where the content of the string is the object's representation in serialized form).
Definition at line 104 of file NativeEncoder.php.
Referenced by fpoirotte\XRL\Encoder\encodeError().
fpoirotte\XRL\NativeEncoder::encodeError |
( |
\Exception |
$error | ) |
|
fpoirotte\XRL\NativeEncoder::encodeResponse |
( |
|
$response | ) |
|
static fpoirotte\XRL\NativeEncoder::isUTF8 |
( |
|
$text | ) |
|
|
staticprotected |
Can be used to determine if a string contains a sequence of valid UTF-8 encoded codepoints.
- Parameters
-
string | $text | Some text to test for UTF-8 correctness. |
- Return values
-
bool | true if the $text contains a valid UTF-8 sequence, false otherwise. |
Definition at line 48 of file NativeEncoder.php.
The documentation for this class was generated from the following file: