Class EmailParser
Class EmailParser
Handles the Email entity object parsing and encoding so that PHP can pass email records to JavaScript and vice versa. What it actually does is convert an email record into an array that can be encoded into JSON and parsed from JavaScript.
Methods summary
public
parseCollection( array $encodedCollection )
: EmailCollectionInterface
Parse a JSON formatted email collection.
public
parseEmail( array $encodedEmail )
: EmailInterface
Parse array that contains the email information sent by the JavaScript files.
public
parseContact( array $encodedContact )
: EmailContact
Parse the contact data and return an EmailContact object.
public
parseAttachment( array $encodedAttachment )
: EmailAttachment
Parse the contact data and return an EmailAttachment object.
public
encodeCollection( EmailCollectionInterface $collection )
: array
Encode EmailCollection object to an array that can be later encoded into JSON string.
public
encodeEmail( EmailInterface $email )
: array
Encode Email object that contains the email information to an array.
public
encodeContact( EmailContactInterface $contact )
: array
Convert an EmailContact object to an array.
public
encodeAttachment( EmailAttachmentInterface $attachment )
: array
Convert an EmailAttachment object to an array.