Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Helpers
    • Orders
    • Serializers
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Interfaces
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AbstractJsonSerializer
  • AddressJsonSerializer
  • CategoryJsonSerializer
  • CategoryListItemJsonSerializer
  • CountryJsonSerializer
  • CustomerJsonSerializer
  • EmailJsonSerializer
  • OrderJsonSerializer
  • OrderListItemJsonSerializer
  • ProductJsonSerializer
  • ProductListItemJsonSerializer
  • ZoneJsonSerializer

Interfaces

  • SerializerInterface

Class EmailJsonSerializer

Class EmailsJsonSerializer

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

AbstractJsonSerializer implements SerializerInterface
Extended by EmailJsonSerializer
Package: Extensions\Serializers
Category: System
Located at Extensions/Serializers/EmailJsonSerializer.inc.php

Methods summary

public string|array
# serialize( EmailInterface $object, boolean $encode = true )

Serialize email object (from Email instance to json string)

Serialize email object (from Email instance to json string)

Parameters

$object
Contains the email data.
$encode

(optional) Whether to json_encode the result of the method (default true). Sometimes it might be required to encode an array of multiple email records together and not one by one.

Returns

string|array
public EmailInterface
# deserialize( string $string, object $baseObject = null )

Deserialize email JSON string.

Deserialize email JSON string.

Parameters

$string
JSON string that contains the data of the email.
$baseObject

(optional) If provided, this will be the base object to be updated and no new instance will be created.

Returns

EmailInterface
Returns the deserialized Email object.

Throws

InvalidArgumentException
If the argument is not a string or is empty.
protected array
# _serializeContact( EmailContactInterface $contact )

Serialize EmailContact

Serialize EmailContact

Parameters

$contact

Returns

array
protected EmailContact
# _deserializeContact( stdClass $contact, $type )

Deserialize EmailContact

Deserialize EmailContact

Parameters

$contact
$type

Returns

EmailContact
protected array
# _serializeAttachment( EmailAttachmentInterface $attachment )

Serialize EmailAttachment

Serialize EmailAttachment

Parameters

$attachment

Returns

array
protected EmailAttachment
# _deserializeAttachment( stdClass $attachment )

Deserialize EmailAttachment

Deserialize EmailAttachment

Parameters

$attachment

Returns

EmailAttachment

Methods inherited from AbstractJsonSerializer

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

Properties summary

Properties inherited from AbstractJsonSerializer

$languageProvider

API documentation generated by ApiGen