PHP 클래스 Falcon_Message, Falcon

파일 보기 프로젝트 열기: rmccue/Falcon 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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