Changeset 4812 in project


Ignore:
Timestamp:
07/01/07 19:57:50 (13 years ago)
Author:
arto
Message:

php-s11n: Documented the exported parameters on the wiki page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/php-s11n

    r4809 r4812  
    110110
    111111
    112 == Supported data types
     112== Data types
    113113
    114114PHP's [[http://es.php.net/manual/en/language.types.php|native data types]]
     
    152152<tr>
    153153<td>vector</td>
    154 <td>[[http://php.net/manual/en/language.types.array.php|array]] (contiguous numerical indexing 0..n-1)</td>
     154<td>[[http://php.net/manual/en/language.types.array.php|array]] (contiguous numerical indexing from 0..n-1)</td>
    155155</tr>
    156156<tr>
    157157<td>alist</td>
    158 <td>[[http://php.net/manual/en/language.types.array.php|array]] (associative, both numeric and string keys)</td>
     158<td>[[http://php.net/manual/en/language.types.array.php|array]] (associative, numeric or string keys)</td>
    159159</tr>
    160160<tr>
    161161<td>hash-table</td>
    162 <td>array (associative, both numeric and string keys)</td>
     162<td>array (associative, numeric or string keys)</td>
    163163</tr>
    164164<tr>
     
    174174
    175175In other words, PHP's native types form a minimal subset of Scheme's, so
    176 unserializing PHP data in Scheme will always work, but you have to be
     176while unserializing PHP data in Scheme will always work, you have to be
    177177mindful when serializing out of Scheme.
    178178
     
    221221 [procedure] (php-serialize VALUE)
    222222
    223 Returns a serialized string representation of {{VALUE}}.
     223Returns a serialized string representation of {{VALUE}} in PHP format.
     224Internally, this procedure will call {{php-s11n-write}} to do all the actual
     225work.
    224226
    225227=== php-unserialize
     
    227229 [procedure] (php-unserialize STRING)
    228230
    229 Converts the serialized {{STRING}} into a value.
     231Converts {{STRING}}, which is expected to be a PHP format serialized string,
     232into a Scheme value. Internally, this procedure will call {{php-s11n-read}}
     233to do all the actual work.
    230234
    231235
     
    234238=== php-s11n-writer
    235239
    236  [procedure] (php-s11n-writer [PROC])
     240 [parameter] php-s11n-writer
     241
     242Procedure to call for serializing any Scheme values that are not included in
     243the data type mappings built into the {{php-s11n}} egg. The procedure will
     244be invoked with two arguments, {{VALUE}} and {{PORT}}.
     245
     246The parameter defaults to {{#f}}, raising an error when trying to serialize
     247an unsupported data type.
    237248
    238249=== php-s11n-reader
    239250
    240  [procedure] (php-s11n-reader [PROC])
     251 [parameter] php-s11n-reader
     252
     253Procedure to call for unserializing any encountered unknown data type
     254specifiers in the input. The procedure will be invoked with one argument,
     255{{PORT}}. You should never need to handle this case unless PHP's
     256serialization format changes.
     257
     258The parameter defaults to {{#f}}, raising an error if the serialized format
     259contains unknown data type specifiers.
    241260
    242261=== php-s11n-array-reader
    243262
    244  [procedure] (php-s11n-array-reader [PROC])
     263 [parameter] php-s11n-array-reader
     264
     265Procedure to call for unserializing a PHP array encountered in the input.
     266The procedure will be invoked with one argument, {{PORT}}.
     267
     268The parameter defaults to {{php-s11n-read-array}}.
    245269
    246270=== php-s11n-object-reader
    247271
    248  [procedure] (php-s11n-object-reader [PROC])
     272 [parameter] php-s11n-object-reader
     273
     274Procedure to call for unserializing a PHP object encountered in the input.
     275The procedure will be invoked with one argument, {{PORT}}.
     276
     277The parameter defaults to {{php-s11n-read-object}}.
    249278
    250279
Note: See TracChangeset for help on using the changeset viewer.