PHP Interface Tebru\Retrofit\Adapter\SerializerAdapter

Author: Nate Brunette ([email protected])
Datei anzeigen Open project: tebru/retrofit-php

Public Methods

Method Description
serialize ( mixed $data, array $context = [] ) : string Serialize an object to a string
setDefaultSerializationContext ( array $context ) Set the default serialization context
setSerializeTo ( string $serializeTo ) Set the format that data should be serialized to
toArray ( mixed $data, array $context = [] ) : array Serialize an object to an array

Method Details

serialize() public method

Serialize an object to a string
public serialize ( mixed $data, array $context = [] ) : string
$data mixed The data that should be serialized
$context array Serializer specific context
return string

setDefaultSerializationContext() public method

Set the default serialization context
public setDefaultSerializationContext ( array $context )
$context array

setSerializeTo() public method

Set the format that data should be serialized to
public setSerializeTo ( string $serializeTo )
$serializeTo string

toArray() public method

Serialize an object to an array
public toArray ( mixed $data, array $context = [] ) : array
$data mixed The data that should be serialized
$context array Serializer specific context
return array