(PECL xcommerce >= 1.0.0)
Xcom::decode — Decodes an avro message
$avro_msg
, string $json_schema
)This method decodes an avro message.
avro_message
The binary avro message to be decoded.
json_schema
The avro JSON schema (avpr) to be used in decoding the message.
Returns a stdClass
object, or FALSE on failure.
Przykład #1 Xcom::decode() example
<?php
$schema = file_get_contents('http://api.x.com/ocl/com.x.example.v1/OrderFulfillment/OrderShipped/1.2.0/');
$xcom = new Xcom();
$xcom->decode(file_get_contents('php://input'), $schema);
?>