PHP Класс Common\Mailer\Message

Наследование: extends Swift_Message
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $subject = null, string $body = null, string $contentType = null, string $charset = null ) Create a new Message.
addAttachments ( array $attachments ) : Message Attach multiple attachments to this message
newInstance ( string $subject = null, string $body = null, string $contentType = null, string $charset = null ) : Message Create a new Message.
parseHtml ( string $template, array $variables, boolean $addUTM = false ) : Message Parses a TwigTemplate with the wanted variables
setPlainText ( string $content ) : Message Add plaintext content as fallback for the html

Приватные методы

Метод Описание
addUTM ( string $html, string $subject ) : string
cssToInlineStyles ( string $html ) : string Converts all css to inline styles
getTemplateContent ( string $template, array $variables = null ) : string Returns the content from a given template
relativeToAbsolute ( string $html ) : string Replace internal links and images to absolute links

Описание методов

__construct() публичный Метод

Details may be optionally passed into the constructor.
public __construct ( string $subject = null, string $body = null, string $contentType = null, string $charset = null )
$subject string
$body string
$contentType string
$charset string

addAttachments() публичный Метод

Attach multiple attachments to this message
public addAttachments ( array $attachments ) : Message
$attachments array
Результат Message

newInstance() публичный статический Метод

Create a new Message.
public static newInstance ( string $subject = null, string $body = null, string $contentType = null, string $charset = null ) : Message
$subject string
$body string
$contentType string
$charset string
Результат Message

parseHtml() публичный Метод

Parses a TwigTemplate with the wanted variables
public parseHtml ( string $template, array $variables, boolean $addUTM = false ) : Message
$template string
$variables array
$addUTM boolean
Результат Message

setPlainText() публичный Метод

Add plaintext content as fallback for the html
public setPlainText ( string $content ) : Message
$content string
Результат Message