public function __construct($params = array())
{
$this->_params = array_merge(array('authmethod' => self::AUTH_AUTOMATIC, 'bypassauth' => false, 'context' => array(), 'euser' => null, 'host' => 'localhost', 'logger' => null, 'password' => '', 'port' => 4190, 'secure' => true, 'timeout' => 5, 'user' => ''), $params);
/* Try to include the Auth_SASL package. If the package is not
* available, we disable the authentication methods that depend upon
* it. */
if (!class_exists('Auth_SASL')) {
$this->_debug('Auth_SASL not present');
$this->supportedAuthMethods = array_diff($this->supportedAuthMethods, $this->supportedSASLAuthMethods);
}
if ($this->_params['logger']) {
$this->setLogger($this->_params['logger']);
}
if (strlen($this->_params['user']) && strlen($this->_params['password'])) {
$this->_handleConnectAndLogin();
}
}