PHP 클래스 BP_Reply_By_Email_Connect, bp-reply-by-email

Instantiate the class with the static init() method, which will return the the IMAP resource on success. Note: You will need to manually close the connection yourself with {@link imap_close()}.
부터: 1.0-RC3
파일 보기 프로젝트 열기: r-a-y/bp-reply-by-email 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $args = [], resource $connection = false ) : resource | boolean Constructor.
init ( $args = [], $connection = false ) : resource | boolean Static initializer.
is_ssl ( integer $port ) : boolean Should we enable SSL for the IMAP connection?

보호된 메소드들

메소드 설명
connect ( ) : resource | boolean Connect to an IMAP inbox.
get_mailbox ( ) : string Get the mailbox we want to connect to.
is_reconnection ( ) : boolean Whether we should attempt a reconnection.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $args = [], resource $connection = false ) : resource | boolean
$args array { An array of arguments. @type string $host The server name. (eg. imap.gmail.com) @type int $port The port number used by the server name. @type string $username The username used to login to the server. @type string $password The password used to login to the server. @type bool $validatecert Whether to validate certificates from TLS/ SSL server. Defaults to true. @type string $mailbox The mailbox to open. Defaults to 'INBOX'. @type int $retries How many times to try reconnection on failure. Defaults to 1. @type bool $reconnect Are we attempting a reconnection? Defaults to false. }
$connection resource The IMAP resource if attempting a reconnection.
리턴 resource | boolean The IMAP resource on success. Boolean false on failure.

connect() 보호된 메소드

Connect to an IMAP inbox.
protected connect ( ) : resource | boolean
리턴 resource | boolean The IMAP resource on success. Boolean false on failure.

get_mailbox() 보호된 메소드

This, basically, returns the first parameter of {@link imap_open()}, which is also the second parameter of {@link imap_reopen()}.
protected get_mailbox ( ) : string
리턴 string

init() 공개 정적인 메소드

Returns IMAP resource on success using the connect() method. For parameters, see constructor.
public static init ( $args = [], $connection = false ) : resource | boolean
리턴 resource | boolean The IMAP resource on success. Boolean false on failure.

is_reconnection() 보호된 메소드

Whether we should attempt a reconnection.
protected is_reconnection ( ) : boolean
리턴 boolean

is_ssl() 공개 정적인 메소드

Check to see if both the OpenSSL and IMAP modules are loaded. Next, see if the port is explictly 993.
public static is_ssl ( integer $port ) : boolean
$port integer The port number used for the IMAP connection.
리턴 boolean