Class ReviewJsonSerializer

Class ReviewJsonSerializer

This class will serialize and deserialize a Review entity. It can be used into many places where PHP interacts with external requests such as AJAX or API communications.

AbstractJsonSerializer implements SerializerInterface
ReviewJsonSerializer

Methods summary

public __construct( ReviewWriteServiceInterface $reviewWriteService )

ReviewJsonSerializer constructor.

public serialize( ReviewInterface $object, boolean $encode = true ) : string|array

Serialize a Review object to a JSON string.

public deserialize( string $string, ReviewInterface $baseObject = null ) : ReviewInterface

Deserialize a Product JSON String.

public serializeReviewCollection( ReviewCollection $reviewCollection, boolean $encode = true ) : string|array

Serializes review collections.

protected _serializeReviewCustomer( ReviewCustomerInterface $reviewCustomer ) : array

Serializes review customer entities.

protected _deserializeReviewCustomer( stdClass $reviewCustomerData ) : ReviewCustomerInterface

Deserialize review customer entities.

Methods inherited from AbstractJsonSerializer

_deserializeAddonValues(), _deserializeLanguageSpecificProperty(), _serializeAddonValues(), _serializeLanguageSpecificProperty(), jsonEncode()

Properties summary

protected $reviewWriteService : ReviewWriteServiceInterface

Reviews write service.


		

Properties inherited from AbstractJsonSerializer

$languageProvider