public function __construct(string
$host = 'localhost', int
$port = 0, bool
$tls = null, EventDispatcherInterface
$dispatcher = null, LoggerInterface
$logger = null, AbstractStream
$stream = null, array
$authenticators = null
) { parent::
__construct($stream,
$dispatcher,
$logger);
if (null ===
$authenticators) { // fallback to default authenticators
// order is important here (roughly most secure and popular first)
$authenticators =
[ new Auth\
CramMd5Authenticator(),
new Auth\
LoginAuthenticator(),
new Auth\
PlainAuthenticator(),
new Auth\
XOAuth2Authenticator(),
];
} $this->
setAuthenticators($authenticators);
/** @var SocketStream $stream */
$stream =
$this->
getStream();
if (null ===
$tls) { if (465 ===
$port) { $tls = true;
}