Elastification PHP Client API
Class

Elastification\Client\Serializer\NativeJsonSerializer

class NativeJsonSerializer implements SerializerInterface

Simple Native JSON Serializer.

Serializes the response using the native jsonencode/jsondecode commands. the params allow you to control the type of result, either a stdClass or an array/hash map.

Methods

string serialize(mixed $data, array $params = array())

GatewayInterface deserialize(string $data, array $params = array())

Details

at line 39
public string serialize(mixed $data, array $params = array())

Parameters

mixed $data The data to handle.
array $params The params are passed to the chosen serializer.

Return Value

string

at line 47
public GatewayInterface deserialize(string $data, array $params = array())

Parameters

string $data The data to handle.
array $params The params are passed to the chosen serializer.

Return Value

GatewayInterface