PHP Класс BP_Reply_By_Email_IMAP, bp-reply-by-email

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

Открытые свойства

Свойство Тип Описание
$html Is the current email message body HTML?

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

Свойство Тип Описание
$connection Holds the current IMAP connection.

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

Метод Описание
body_parser ( resource $imap, integer $i, boolean $reply = true ) : mixed Parses the body of an email message.
init ( ) : BP_Reply_By_Email_IMAP Creates a singleton instance of the BP_Reply_By_Email_IMAP class
multipart_plain_text_parser ( obj $parts, resource $imap, integer $i, boolean $subpart = false ) : array Multipart plain-text parser.
run ( ) The main method we use to parse an IMAP inbox.

Защищенные методы

Метод Описание
get_mail_headers ( resource $imap, integer $i ) : mixed Fetch all headers for an email and parses them into an array.

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

Метод Описание
__construct ( ) Private constructor. Intentionally left empty.
close ( ) : boolean Closes the IMAP connection.
connect ( ) : boolean Connects to the IMAP inbox.
is_connected ( ) : boolean Check to see if the IMAP connection is connected.

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

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

Tries to fetch the plain-text version when available first. Otherwise, will fallback to the HTML version.
public static body_parser ( resource $imap, integer $i, boolean $reply = true ) : mixed
$imap resource The current IMAP connection
$i integer The current email message number
$reply boolean If we're parsing a reply or not. Default set to true.
Результат mixed Either the email body on success or false on failure

get_mail_headers() защищенный Метод

Fetch all headers for an email and parses them into an array.
protected get_mail_headers ( resource $imap, integer $i ) : mixed
$imap resource The current IMAP connection
$i integer The current email message number
Результат mixed Array of email headers. False if no headers.

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

Creates a singleton instance of the BP_Reply_By_Email_IMAP class
public static init ( ) : BP_Reply_By_Email_IMAP
Результат BP_Reply_By_Email_IMAP object

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

Used during {@link BP_Reply_By_Email_IMAP::body_parser()} if email is a multipart email. This method parses a multipart email to return the plain-text body as well as the encoding type and other parameters on success.
public static multipart_plain_text_parser ( obj $parts, resource $imap, integer $i, boolean $subpart = false ) : array
$parts obj The multiple parts of an email. See imap_fetchstructure() for more details.
$imap resource The current IMAP connection
$i integer The current email message number
$subpart boolean If we're parsing a subpart or not. Defaults to false.
Результат array A populated array containing the body, encoding type and other parameters on success. Empty array on failure.

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

The main method we use to parse an IMAP inbox.
public run ( )

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

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

Holds the current IMAP connection.
protected $connection

$html публичное статическое свойство

Is the current email message body HTML?
public static $html