Swift_Transport_Esmtp_AuthHandler::_getAuthenticatorsForAgent PHP Method

_getAuthenticatorsForAgent() protected method

Returns the authenticator list for the given agent.
protected _getAuthenticatorsForAgent ( ) : array
return array
    protected function _getAuthenticatorsForAgent()
    {
        if (!($mode = strtolower($this->_auth_mode))) {
            return $this->_authenticators;
        }
        foreach ($this->_authenticators as $authenticator) {
            if (strtolower($authenticator->getAuthKeyword()) == $mode) {
                return array($authenticator);
            }
        }
        throw new Swift_TransportException('Auth mode ' . $mode . ' is invalid');
    }