todo:ext:wddx
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
todo:ext:wddx [2008/12/02 12:14] – more details about the various options for compat magicaltux | todo:ext:wddx [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
The main problem for packets generation is the values types. Wddx supports a range of types including common types also found in PHP (array, struct, string, boolean, number, null, and binary with PHP 6), but also some types specific to Wddx, including dateTime and recordSet. | The main problem for packets generation is the values types. Wddx supports a range of types including common types also found in PHP (array, struct, string, boolean, number, null, and binary with PHP 6), but also some types specific to Wddx, including dateTime and recordSet. | ||
- | ==== dateTime | + | ==== WDDX types ==== |
+ | |||
+ | === dateTime | ||
The new DateTime php object could be automatically serialized to the dateTime wddx type. | The new DateTime php object could be automatically serialized to the dateTime wddx type. | ||
Line 15: | Line 17: | ||
* Already existing :) | * Already existing :) | ||
- | ==== recordSet | + | === recordSet === |
A recordSet is like a table (ie. a numerically-indexed array containing in each row arrays with always the same columns). | A recordSet is like a table (ie. a numerically-indexed array containing in each row arrays with always the same columns). | ||
Line 21: | Line 23: | ||
The implementation currently converts everything to arrays. | The implementation currently converts everything to arrays. | ||
- | ==== Binary data ==== | + | === Binary data === |
WDDX offers the ability to transfer binary data (base64 encoded). There is currently no way to encode data in this format. | WDDX offers the ability to transfer binary data (base64 encoded). There is currently no way to encode data in this format. | ||
Line 30: | Line 32: | ||
* Finding a way to force a value to binary | * Finding a way to force a value to binary | ||
- | ===== Possibilities | + | ==== Possibilities ==== |
- | ==== New class approach | + | === New class approach === |
Create a new WddxValue class, with a " | Create a new WddxValue class, with a " | ||
Line 40: | Line 42: | ||
<code php> | <code php> | ||
- | ==== Native types ==== | + | === Native types === |
Problems: | Problems: | ||
Line 47: | Line 49: | ||
* PHP's DateTime type is not compatible with current behaviour of the Wddx ext. | * PHP's DateTime type is not compatible with current behaviour of the Wddx ext. | ||
- | ==== Hybrid solution | + | === Hybrid solution === |
* Create WddxBinaryString (only for PHP < 6) and a WddxResultSet classes | * Create WddxBinaryString (only for PHP < 6) and a WddxResultSet classes | ||
Line 55: | Line 57: | ||
* DateTime can't be treated as it was before (current implementation returns an unix timestamp). Creating a castable WddxDateTime class would solve this issue. | * DateTime can't be treated as it was before (current implementation returns an unix timestamp). Creating a castable WddxDateTime class would solve this issue. | ||
+ | ===== PHP6 support ===== | ||
+ | |||
+ | Input (XML) string should be UTF-8 encoded. In the case of unicode string, encoding is irrelevant, however for binary string we need to force utf-8 (with UG(utf8_conv)) | ||
+ | |||
+ | Input variables/ |
todo/ext/wddx.1228220079.txt.gz · Last modified: 2017/09/22 13:28 (external edit)