PHP Класс Falcon_Message, Falcon

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

Защищенные свойства (Protected)

Свойство Тип Описание
$author string Author name
$html string HTML content
$options array Handler options
$reply_address_handler callable Reply-To email address handler
$subject string Subject line
$text string Text content

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

Метод Описание
get_author ( ) : string Get the author name
get_html ( ) : string Get the HTML content of the email
get_options ( ) : array Get the options for this message
get_reply_address ( WP_User $user ) : string | null Get the reply address
get_subject ( ) : string Get the subject line
get_text ( ) : string Get the text content of the email
set_author ( string $author ) Set the author name
set_html ( string $html ) Set the HTML content of the email
set_options ( array $options ) Set the options for this message
set_reply_address_handler ( callable $handler ) : string Set the reply address handler
set_subject ( string $subject ) Set the subject line
set_text ( stirng $text ) Set the text content of the email

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

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

Get the author name
public get_author ( ) : string
Результат string Author name

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

Get the HTML content of the email
public get_html ( ) : string
Результат string HTML content

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

Get the options for this message
public get_options ( ) : array
Результат array

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

This controls the "Reply-To" field in the email. Typically, this will contain hash data for the connector to work out what incoming emails are replying to, but this cannot be assumed.
public get_reply_address ( WP_User $user ) : string | null
$user WP_User
Результат string | null Reply email address

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

Get the subject line
public get_subject ( ) : string
Результат string Subject line (including prefixes)

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

Get the text content of the email
public get_text ( ) : string
Результат string Plain text content

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

This controls the "From" field in the email. The email address will be set automatically by the handler based on the preference in the admin.
public set_author ( string $author )
$author string Author name

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

Set the HTML content of the email
public set_html ( string $html )
$html string HTML content

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

Set the options for this message
public set_options ( array $options )
$options array { @param int $id Post ID to use for hash @param string $author Author name (leave blank for no name) }

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

This controls the "Reply-To" field in the email. The callback should conform to the following interface: ** * Get reply address * * @param WP_User $user User to generate address for * @param Falcon_Message $message Message being sent * @return string Reply email address * / function my_handler( WP_User $user, Falcon_Message $message );
public set_reply_address_handler ( callable $handler ) : string
$handler callable Handler function (passed WP_User instance and Falcon_Message handler)
Результат string

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

If the subject line needs to be prefixed with the site name or similar, this should be passed in here. The text will be sent as-is to the handler.
public set_subject ( string $subject )
$subject string Subject line

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

This should include any footer to be sent.
public set_text ( stirng $text )
$text stirng Text content

Описание свойств

$author защищенное свойство

Author name
protected string $author
Результат string

$html защищенное свойство

HTML content
protected string $html
Результат string

$options защищенное свойство

Handler options
protected array $options
Результат array

$reply_address_handler защищенное свойство

Reply-To email address handler
protected callable $reply_address_handler
Результат callable

$subject защищенное свойство

Subject line
protected string $subject
Результат string

$text защищенное свойство

Text content
protected string $text
Результат string