BP_Reply_By_Email_Connect::__construct PHP Method

__construct() public method

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.
return resource | boolean The IMAP resource on success. Boolean false on failure.
    public function __construct($args = array(), $connection = false)
    {
        $this->args = wp_parse_args($args, array('host' => bp_rbe_get_setting('servername'), 'port' => bp_rbe_get_setting('port'), 'username' => bp_rbe_get_setting('username'), 'password' => bp_rbe_get_setting('password') ? bp_rbe_decode(array('string' => bp_rbe_get_setting('password'), 'key' => wp_salt())) : false, 'validatecert' => true, 'mailbox' => 'INBOX', 'retries' => 1, 'reconnect' => false));
        $this->connection = $connection;
    }