@@ -25,40 +25,40 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | class Swift_Transport_Esmtp_Auth_XOAuth2Authenticator implements Swift_Transport_Esmtp_Authenticator |
| 27 | 27 | { |
| 28 | - /** |
|
| 29 | - * Get the name of the AUTH mechanism this Authenticator handles. |
|
| 30 | - * |
|
| 31 | - * @return string |
|
| 32 | - */ |
|
| 33 | - public function getAuthKeyword() |
|
| 34 | - { |
|
| 35 | - return 'XOAUTH2'; |
|
| 36 | - } |
|
| 28 | + /** |
|
| 29 | + * Get the name of the AUTH mechanism this Authenticator handles. |
|
| 30 | + * |
|
| 31 | + * @return string |
|
| 32 | + */ |
|
| 33 | + public function getAuthKeyword() |
|
| 34 | + { |
|
| 35 | + return 'XOAUTH2'; |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * {@inheritdoc} |
|
| 40 | - */ |
|
| 41 | - public function authenticate(Swift_Transport_SmtpAgent $agent, $email, $token) |
|
| 42 | - { |
|
| 43 | - try { |
|
| 44 | - $param = $this->constructXOAuth2Params($email, $token); |
|
| 45 | - $agent->executeCommand('AUTH XOAUTH2 '.$param."\r\n", [235]); |
|
| 38 | + /** |
|
| 39 | + * {@inheritdoc} |
|
| 40 | + */ |
|
| 41 | + public function authenticate(Swift_Transport_SmtpAgent $agent, $email, $token) |
|
| 42 | + { |
|
| 43 | + try { |
|
| 44 | + $param = $this->constructXOAuth2Params($email, $token); |
|
| 45 | + $agent->executeCommand('AUTH XOAUTH2 '.$param."\r\n", [235]); |
|
| 46 | 46 | |
| 47 | - return true; |
|
| 48 | - } catch (Swift_TransportException $e) { |
|
| 49 | - $agent->executeCommand("RSET\r\n", [250]); |
|
| 47 | + return true; |
|
| 48 | + } catch (Swift_TransportException $e) { |
|
| 49 | + $agent->executeCommand("RSET\r\n", [250]); |
|
| 50 | 50 | |
| 51 | - throw $e; |
|
| 52 | - } |
|
| 53 | - } |
|
| 51 | + throw $e; |
|
| 52 | + } |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - /** |
|
| 56 | - * Construct the auth parameter. |
|
| 57 | - * |
|
| 58 | - * @see https://developers.google.com/google-apps/gmail/xoauth2_protocol#the_sasl_xoauth2_mechanism |
|
| 59 | - */ |
|
| 60 | - protected function constructXOAuth2Params($email, $token) |
|
| 61 | - { |
|
| 62 | - return base64_encode("user=$email\1auth=Bearer $token\1\1"); |
|
| 63 | - } |
|
| 55 | + /** |
|
| 56 | + * Construct the auth parameter. |
|
| 57 | + * |
|
| 58 | + * @see https://developers.google.com/google-apps/gmail/xoauth2_protocol#the_sasl_xoauth2_mechanism |
|
| 59 | + */ |
|
| 60 | + protected function constructXOAuth2Params($email, $token) |
|
| 61 | + { |
|
| 62 | + return base64_encode("user=$email\1auth=Bearer $token\1\1"); |
|
| 63 | + } |
|
| 64 | 64 | } |
@@ -15,30 +15,30 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Swift_Transport_Esmtp_Auth_PlainAuthenticator implements Swift_Transport_Esmtp_Authenticator |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * Get the name of the AUTH mechanism this Authenticator handles. |
|
| 20 | - * |
|
| 21 | - * @return string |
|
| 22 | - */ |
|
| 23 | - public function getAuthKeyword() |
|
| 24 | - { |
|
| 25 | - return 'PLAIN'; |
|
| 26 | - } |
|
| 18 | + /** |
|
| 19 | + * Get the name of the AUTH mechanism this Authenticator handles. |
|
| 20 | + * |
|
| 21 | + * @return string |
|
| 22 | + */ |
|
| 23 | + public function getAuthKeyword() |
|
| 24 | + { |
|
| 25 | + return 'PLAIN'; |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * {@inheritdoc} |
|
| 30 | - */ |
|
| 31 | - public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $password) |
|
| 32 | - { |
|
| 33 | - try { |
|
| 34 | - $message = base64_encode($username.\chr(0).$username.\chr(0).$password); |
|
| 35 | - $agent->executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), [235]); |
|
| 28 | + /** |
|
| 29 | + * {@inheritdoc} |
|
| 30 | + */ |
|
| 31 | + public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $password) |
|
| 32 | + { |
|
| 33 | + try { |
|
| 34 | + $message = base64_encode($username.\chr(0).$username.\chr(0).$password); |
|
| 35 | + $agent->executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), [235]); |
|
| 36 | 36 | |
| 37 | - return true; |
|
| 38 | - } catch (Swift_TransportException $e) { |
|
| 39 | - $agent->executeCommand("RSET\r\n", [250]); |
|
| 37 | + return true; |
|
| 38 | + } catch (Swift_TransportException $e) { |
|
| 39 | + $agent->executeCommand("RSET\r\n", [250]); |
|
| 40 | 40 | |
| 41 | - throw $e; |
|
| 42 | - } |
|
| 43 | - } |
|
| 41 | + throw $e; |
|
| 42 | + } |
|
| 43 | + } |
|
| 44 | 44 | } |
@@ -15,254 +15,254 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Swift_Transport_Esmtp_AuthHandler implements Swift_Transport_EsmtpHandler |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * Authenticators available to process the request. |
|
| 20 | - * |
|
| 21 | - * @var Swift_Transport_Esmtp_Authenticator[] |
|
| 22 | - */ |
|
| 23 | - private $authenticators = []; |
|
| 18 | + /** |
|
| 19 | + * Authenticators available to process the request. |
|
| 20 | + * |
|
| 21 | + * @var Swift_Transport_Esmtp_Authenticator[] |
|
| 22 | + */ |
|
| 23 | + private $authenticators = []; |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * The username for authentication. |
|
| 27 | - * |
|
| 28 | - * @var string |
|
| 29 | - */ |
|
| 30 | - private $username; |
|
| 25 | + /** |
|
| 26 | + * The username for authentication. |
|
| 27 | + * |
|
| 28 | + * @var string |
|
| 29 | + */ |
|
| 30 | + private $username; |
|
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * The password for authentication. |
|
| 34 | - * |
|
| 35 | - * @var string |
|
| 36 | - */ |
|
| 37 | - private $password; |
|
| 32 | + /** |
|
| 33 | + * The password for authentication. |
|
| 34 | + * |
|
| 35 | + * @var string |
|
| 36 | + */ |
|
| 37 | + private $password; |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * The auth mode for authentication. |
|
| 41 | - * |
|
| 42 | - * @var string |
|
| 43 | - */ |
|
| 44 | - private $auth_mode; |
|
| 39 | + /** |
|
| 40 | + * The auth mode for authentication. |
|
| 41 | + * |
|
| 42 | + * @var string |
|
| 43 | + */ |
|
| 44 | + private $auth_mode; |
|
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * The ESMTP AUTH parameters available. |
|
| 48 | - * |
|
| 49 | - * @var string[] |
|
| 50 | - */ |
|
| 51 | - private $esmtpParams = []; |
|
| 46 | + /** |
|
| 47 | + * The ESMTP AUTH parameters available. |
|
| 48 | + * |
|
| 49 | + * @var string[] |
|
| 50 | + */ |
|
| 51 | + private $esmtpParams = []; |
|
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * Create a new AuthHandler with $authenticators for support. |
|
| 55 | - * |
|
| 56 | - * @param Swift_Transport_Esmtp_Authenticator[] $authenticators |
|
| 57 | - */ |
|
| 58 | - public function __construct(array $authenticators) |
|
| 59 | - { |
|
| 60 | - $this->setAuthenticators($authenticators); |
|
| 61 | - } |
|
| 53 | + /** |
|
| 54 | + * Create a new AuthHandler with $authenticators for support. |
|
| 55 | + * |
|
| 56 | + * @param Swift_Transport_Esmtp_Authenticator[] $authenticators |
|
| 57 | + */ |
|
| 58 | + public function __construct(array $authenticators) |
|
| 59 | + { |
|
| 60 | + $this->setAuthenticators($authenticators); |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - /** |
|
| 64 | - * Set the Authenticators which can process a login request. |
|
| 65 | - * |
|
| 66 | - * @param Swift_Transport_Esmtp_Authenticator[] $authenticators |
|
| 67 | - */ |
|
| 68 | - public function setAuthenticators(array $authenticators) |
|
| 69 | - { |
|
| 70 | - $this->authenticators = $authenticators; |
|
| 71 | - } |
|
| 63 | + /** |
|
| 64 | + * Set the Authenticators which can process a login request. |
|
| 65 | + * |
|
| 66 | + * @param Swift_Transport_Esmtp_Authenticator[] $authenticators |
|
| 67 | + */ |
|
| 68 | + public function setAuthenticators(array $authenticators) |
|
| 69 | + { |
|
| 70 | + $this->authenticators = $authenticators; |
|
| 71 | + } |
|
| 72 | 72 | |
| 73 | - /** |
|
| 74 | - * Get the Authenticators which can process a login request. |
|
| 75 | - * |
|
| 76 | - * @return Swift_Transport_Esmtp_Authenticator[] |
|
| 77 | - */ |
|
| 78 | - public function getAuthenticators() |
|
| 79 | - { |
|
| 80 | - return $this->authenticators; |
|
| 81 | - } |
|
| 73 | + /** |
|
| 74 | + * Get the Authenticators which can process a login request. |
|
| 75 | + * |
|
| 76 | + * @return Swift_Transport_Esmtp_Authenticator[] |
|
| 77 | + */ |
|
| 78 | + public function getAuthenticators() |
|
| 79 | + { |
|
| 80 | + return $this->authenticators; |
|
| 81 | + } |
|
| 82 | 82 | |
| 83 | - /** |
|
| 84 | - * Set the username to authenticate with. |
|
| 85 | - * |
|
| 86 | - * @param string $username |
|
| 87 | - */ |
|
| 88 | - public function setUsername($username) |
|
| 89 | - { |
|
| 90 | - $this->username = $username; |
|
| 91 | - } |
|
| 83 | + /** |
|
| 84 | + * Set the username to authenticate with. |
|
| 85 | + * |
|
| 86 | + * @param string $username |
|
| 87 | + */ |
|
| 88 | + public function setUsername($username) |
|
| 89 | + { |
|
| 90 | + $this->username = $username; |
|
| 91 | + } |
|
| 92 | 92 | |
| 93 | - /** |
|
| 94 | - * Get the username to authenticate with. |
|
| 95 | - * |
|
| 96 | - * @return string |
|
| 97 | - */ |
|
| 98 | - public function getUsername() |
|
| 99 | - { |
|
| 100 | - return $this->username; |
|
| 101 | - } |
|
| 93 | + /** |
|
| 94 | + * Get the username to authenticate with. |
|
| 95 | + * |
|
| 96 | + * @return string |
|
| 97 | + */ |
|
| 98 | + public function getUsername() |
|
| 99 | + { |
|
| 100 | + return $this->username; |
|
| 101 | + } |
|
| 102 | 102 | |
| 103 | - /** |
|
| 104 | - * Set the password to authenticate with. |
|
| 105 | - * |
|
| 106 | - * @param string $password |
|
| 107 | - */ |
|
| 108 | - public function setPassword($password) |
|
| 109 | - { |
|
| 110 | - $this->password = $password; |
|
| 111 | - } |
|
| 103 | + /** |
|
| 104 | + * Set the password to authenticate with. |
|
| 105 | + * |
|
| 106 | + * @param string $password |
|
| 107 | + */ |
|
| 108 | + public function setPassword($password) |
|
| 109 | + { |
|
| 110 | + $this->password = $password; |
|
| 111 | + } |
|
| 112 | 112 | |
| 113 | - /** |
|
| 114 | - * Get the password to authenticate with. |
|
| 115 | - * |
|
| 116 | - * @return string |
|
| 117 | - */ |
|
| 118 | - public function getPassword() |
|
| 119 | - { |
|
| 120 | - return $this->password; |
|
| 121 | - } |
|
| 113 | + /** |
|
| 114 | + * Get the password to authenticate with. |
|
| 115 | + * |
|
| 116 | + * @return string |
|
| 117 | + */ |
|
| 118 | + public function getPassword() |
|
| 119 | + { |
|
| 120 | + return $this->password; |
|
| 121 | + } |
|
| 122 | 122 | |
| 123 | - /** |
|
| 124 | - * Set the auth mode to use to authenticate. |
|
| 125 | - * |
|
| 126 | - * @param string $mode |
|
| 127 | - */ |
|
| 128 | - public function setAuthMode($mode) |
|
| 129 | - { |
|
| 130 | - $this->auth_mode = $mode; |
|
| 131 | - } |
|
| 123 | + /** |
|
| 124 | + * Set the auth mode to use to authenticate. |
|
| 125 | + * |
|
| 126 | + * @param string $mode |
|
| 127 | + */ |
|
| 128 | + public function setAuthMode($mode) |
|
| 129 | + { |
|
| 130 | + $this->auth_mode = $mode; |
|
| 131 | + } |
|
| 132 | 132 | |
| 133 | - /** |
|
| 134 | - * Get the auth mode to use to authenticate. |
|
| 135 | - * |
|
| 136 | - * @return string |
|
| 137 | - */ |
|
| 138 | - public function getAuthMode() |
|
| 139 | - { |
|
| 140 | - return $this->auth_mode; |
|
| 141 | - } |
|
| 133 | + /** |
|
| 134 | + * Get the auth mode to use to authenticate. |
|
| 135 | + * |
|
| 136 | + * @return string |
|
| 137 | + */ |
|
| 138 | + public function getAuthMode() |
|
| 139 | + { |
|
| 140 | + return $this->auth_mode; |
|
| 141 | + } |
|
| 142 | 142 | |
| 143 | - /** |
|
| 144 | - * Get the name of the ESMTP extension this handles. |
|
| 145 | - * |
|
| 146 | - * @return string |
|
| 147 | - */ |
|
| 148 | - public function getHandledKeyword() |
|
| 149 | - { |
|
| 150 | - return 'AUTH'; |
|
| 151 | - } |
|
| 143 | + /** |
|
| 144 | + * Get the name of the ESMTP extension this handles. |
|
| 145 | + * |
|
| 146 | + * @return string |
|
| 147 | + */ |
|
| 148 | + public function getHandledKeyword() |
|
| 149 | + { |
|
| 150 | + return 'AUTH'; |
|
| 151 | + } |
|
| 152 | 152 | |
| 153 | - /** |
|
| 154 | - * Set the parameters which the EHLO greeting indicated. |
|
| 155 | - * |
|
| 156 | - * @param string[] $parameters |
|
| 157 | - */ |
|
| 158 | - public function setKeywordParams(array $parameters) |
|
| 159 | - { |
|
| 160 | - $this->esmtpParams = $parameters; |
|
| 161 | - } |
|
| 153 | + /** |
|
| 154 | + * Set the parameters which the EHLO greeting indicated. |
|
| 155 | + * |
|
| 156 | + * @param string[] $parameters |
|
| 157 | + */ |
|
| 158 | + public function setKeywordParams(array $parameters) |
|
| 159 | + { |
|
| 160 | + $this->esmtpParams = $parameters; |
|
| 161 | + } |
|
| 162 | 162 | |
| 163 | - /** |
|
| 164 | - * Runs immediately after a EHLO has been issued. |
|
| 165 | - * |
|
| 166 | - * @param Swift_Transport_SmtpAgent $agent to read/write |
|
| 167 | - */ |
|
| 168 | - public function afterEhlo(Swift_Transport_SmtpAgent $agent) |
|
| 169 | - { |
|
| 170 | - if ($this->username) { |
|
| 171 | - $count = 0; |
|
| 172 | - $errors = []; |
|
| 173 | - foreach ($this->getAuthenticatorsForAgent() as $authenticator) { |
|
| 174 | - if (\in_array(strtolower($authenticator->getAuthKeyword() ?? ''), array_map('strtolower', $this->esmtpParams))) { |
|
| 175 | - ++$count; |
|
| 176 | - try { |
|
| 177 | - if ($authenticator->authenticate($agent, $this->username, $this->password)) { |
|
| 178 | - return; |
|
| 179 | - } |
|
| 180 | - } catch (Swift_TransportException $e) { |
|
| 181 | - // keep the error message, but tries the other authenticators |
|
| 182 | - $errors[] = [$authenticator->getAuthKeyword(), $e->getMessage()]; |
|
| 183 | - } |
|
| 184 | - } |
|
| 185 | - } |
|
| 163 | + /** |
|
| 164 | + * Runs immediately after a EHLO has been issued. |
|
| 165 | + * |
|
| 166 | + * @param Swift_Transport_SmtpAgent $agent to read/write |
|
| 167 | + */ |
|
| 168 | + public function afterEhlo(Swift_Transport_SmtpAgent $agent) |
|
| 169 | + { |
|
| 170 | + if ($this->username) { |
|
| 171 | + $count = 0; |
|
| 172 | + $errors = []; |
|
| 173 | + foreach ($this->getAuthenticatorsForAgent() as $authenticator) { |
|
| 174 | + if (\in_array(strtolower($authenticator->getAuthKeyword() ?? ''), array_map('strtolower', $this->esmtpParams))) { |
|
| 175 | + ++$count; |
|
| 176 | + try { |
|
| 177 | + if ($authenticator->authenticate($agent, $this->username, $this->password)) { |
|
| 178 | + return; |
|
| 179 | + } |
|
| 180 | + } catch (Swift_TransportException $e) { |
|
| 181 | + // keep the error message, but tries the other authenticators |
|
| 182 | + $errors[] = [$authenticator->getAuthKeyword(), $e->getMessage()]; |
|
| 183 | + } |
|
| 184 | + } |
|
| 185 | + } |
|
| 186 | 186 | |
| 187 | - $message = 'Failed to authenticate on SMTP server with username "'.$this->username.'" using '.$count.' possible authenticators.'; |
|
| 188 | - foreach ($errors as $error) { |
|
| 189 | - $message .= ' Authenticator '.$error[0].' returned '.$error[1].'.'; |
|
| 190 | - } |
|
| 191 | - throw new Swift_TransportException($message); |
|
| 192 | - } |
|
| 193 | - } |
|
| 187 | + $message = 'Failed to authenticate on SMTP server with username "'.$this->username.'" using '.$count.' possible authenticators.'; |
|
| 188 | + foreach ($errors as $error) { |
|
| 189 | + $message .= ' Authenticator '.$error[0].' returned '.$error[1].'.'; |
|
| 190 | + } |
|
| 191 | + throw new Swift_TransportException($message); |
|
| 192 | + } |
|
| 193 | + } |
|
| 194 | 194 | |
| 195 | - /** |
|
| 196 | - * Not used. |
|
| 197 | - */ |
|
| 198 | - public function getMailParams() |
|
| 199 | - { |
|
| 200 | - return []; |
|
| 201 | - } |
|
| 195 | + /** |
|
| 196 | + * Not used. |
|
| 197 | + */ |
|
| 198 | + public function getMailParams() |
|
| 199 | + { |
|
| 200 | + return []; |
|
| 201 | + } |
|
| 202 | 202 | |
| 203 | - /** |
|
| 204 | - * Not used. |
|
| 205 | - */ |
|
| 206 | - public function getRcptParams() |
|
| 207 | - { |
|
| 208 | - return []; |
|
| 209 | - } |
|
| 203 | + /** |
|
| 204 | + * Not used. |
|
| 205 | + */ |
|
| 206 | + public function getRcptParams() |
|
| 207 | + { |
|
| 208 | + return []; |
|
| 209 | + } |
|
| 210 | 210 | |
| 211 | - /** |
|
| 212 | - * Not used. |
|
| 213 | - */ |
|
| 214 | - public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = [], &$failedRecipients = null, &$stop = false) |
|
| 215 | - { |
|
| 216 | - } |
|
| 211 | + /** |
|
| 212 | + * Not used. |
|
| 213 | + */ |
|
| 214 | + public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = [], &$failedRecipients = null, &$stop = false) |
|
| 215 | + { |
|
| 216 | + } |
|
| 217 | 217 | |
| 218 | - /** |
|
| 219 | - * Returns +1, -1 or 0 according to the rules for usort(). |
|
| 220 | - * |
|
| 221 | - * This method is called to ensure extensions can be execute in an appropriate order. |
|
| 222 | - * |
|
| 223 | - * @param string $esmtpKeyword to compare with |
|
| 224 | - * |
|
| 225 | - * @return int |
|
| 226 | - */ |
|
| 227 | - public function getPriorityOver($esmtpKeyword) |
|
| 228 | - { |
|
| 229 | - return 0; |
|
| 230 | - } |
|
| 218 | + /** |
|
| 219 | + * Returns +1, -1 or 0 according to the rules for usort(). |
|
| 220 | + * |
|
| 221 | + * This method is called to ensure extensions can be execute in an appropriate order. |
|
| 222 | + * |
|
| 223 | + * @param string $esmtpKeyword to compare with |
|
| 224 | + * |
|
| 225 | + * @return int |
|
| 226 | + */ |
|
| 227 | + public function getPriorityOver($esmtpKeyword) |
|
| 228 | + { |
|
| 229 | + return 0; |
|
| 230 | + } |
|
| 231 | 231 | |
| 232 | - /** |
|
| 233 | - * Returns an array of method names which are exposed to the Esmtp class. |
|
| 234 | - * |
|
| 235 | - * @return string[] |
|
| 236 | - */ |
|
| 237 | - public function exposeMixinMethods() |
|
| 238 | - { |
|
| 239 | - return ['setUsername', 'getUsername', 'setPassword', 'getPassword', 'setAuthMode', 'getAuthMode']; |
|
| 240 | - } |
|
| 232 | + /** |
|
| 233 | + * Returns an array of method names which are exposed to the Esmtp class. |
|
| 234 | + * |
|
| 235 | + * @return string[] |
|
| 236 | + */ |
|
| 237 | + public function exposeMixinMethods() |
|
| 238 | + { |
|
| 239 | + return ['setUsername', 'getUsername', 'setPassword', 'getPassword', 'setAuthMode', 'getAuthMode']; |
|
| 240 | + } |
|
| 241 | 241 | |
| 242 | - /** |
|
| 243 | - * Not used. |
|
| 244 | - */ |
|
| 245 | - public function resetState() |
|
| 246 | - { |
|
| 247 | - } |
|
| 242 | + /** |
|
| 243 | + * Not used. |
|
| 244 | + */ |
|
| 245 | + public function resetState() |
|
| 246 | + { |
|
| 247 | + } |
|
| 248 | 248 | |
| 249 | - /** |
|
| 250 | - * Returns the authenticator list for the given agent. |
|
| 251 | - * |
|
| 252 | - * @return array |
|
| 253 | - */ |
|
| 254 | - protected function getAuthenticatorsForAgent() |
|
| 255 | - { |
|
| 256 | - if (!$mode = strtolower($this->auth_mode ?? '')) { |
|
| 257 | - return $this->authenticators; |
|
| 258 | - } |
|
| 249 | + /** |
|
| 250 | + * Returns the authenticator list for the given agent. |
|
| 251 | + * |
|
| 252 | + * @return array |
|
| 253 | + */ |
|
| 254 | + protected function getAuthenticatorsForAgent() |
|
| 255 | + { |
|
| 256 | + if (!$mode = strtolower($this->auth_mode ?? '')) { |
|
| 257 | + return $this->authenticators; |
|
| 258 | + } |
|
| 259 | 259 | |
| 260 | - foreach ($this->authenticators as $authenticator) { |
|
| 261 | - if (strtolower($authenticator->getAuthKeyword() ?? '') == $mode) { |
|
| 262 | - return [$authenticator]; |
|
| 263 | - } |
|
| 264 | - } |
|
| 260 | + foreach ($this->authenticators as $authenticator) { |
|
| 261 | + if (strtolower($authenticator->getAuthKeyword() ?? '') == $mode) { |
|
| 262 | + return [$authenticator]; |
|
| 263 | + } |
|
| 264 | + } |
|
| 265 | 265 | |
| 266 | - throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); |
|
| 267 | - } |
|
| 266 | + throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); |
|
| 267 | + } |
|
| 268 | 268 | } |
@@ -15,89 +15,89 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Swift_Transport_FailoverTransport extends Swift_Transport_LoadBalancedTransport |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * Registered transport currently used. |
|
| 20 | - * |
|
| 21 | - * @var Swift_Transport |
|
| 22 | - */ |
|
| 23 | - private $currentTransport; |
|
| 18 | + /** |
|
| 19 | + * Registered transport currently used. |
|
| 20 | + * |
|
| 21 | + * @var Swift_Transport |
|
| 22 | + */ |
|
| 23 | + private $currentTransport; |
|
| 24 | 24 | |
| 25 | - // needed as __construct is called from elsewhere explicitly |
|
| 26 | - public function __construct() |
|
| 27 | - { |
|
| 28 | - parent::__construct(); |
|
| 29 | - } |
|
| 25 | + // needed as __construct is called from elsewhere explicitly |
|
| 26 | + public function __construct() |
|
| 27 | + { |
|
| 28 | + parent::__construct(); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * {@inheritdoc} |
|
| 33 | - */ |
|
| 34 | - public function ping() |
|
| 35 | - { |
|
| 36 | - $maxTransports = \count($this->transports); |
|
| 37 | - for ($i = 0; $i < $maxTransports |
|
| 38 | - && $transport = $this->getNextTransport(); ++$i) { |
|
| 39 | - if ($transport->ping()) { |
|
| 40 | - return true; |
|
| 41 | - } else { |
|
| 42 | - $this->killCurrentTransport(); |
|
| 43 | - } |
|
| 44 | - } |
|
| 31 | + /** |
|
| 32 | + * {@inheritdoc} |
|
| 33 | + */ |
|
| 34 | + public function ping() |
|
| 35 | + { |
|
| 36 | + $maxTransports = \count($this->transports); |
|
| 37 | + for ($i = 0; $i < $maxTransports |
|
| 38 | + && $transport = $this->getNextTransport(); ++$i) { |
|
| 39 | + if ($transport->ping()) { |
|
| 40 | + return true; |
|
| 41 | + } else { |
|
| 42 | + $this->killCurrentTransport(); |
|
| 43 | + } |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - return \count($this->transports) > 0; |
|
| 47 | - } |
|
| 46 | + return \count($this->transports) > 0; |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * Send the given Message. |
|
| 51 | - * |
|
| 52 | - * Recipient/sender data will be retrieved from the Message API. |
|
| 53 | - * The return value is the number of recipients who were accepted for delivery. |
|
| 54 | - * |
|
| 55 | - * @param string[] $failedRecipients An array of failures by-reference |
|
| 56 | - * |
|
| 57 | - * @return int |
|
| 58 | - */ |
|
| 59 | - public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) |
|
| 60 | - { |
|
| 61 | - $maxTransports = \count($this->transports); |
|
| 62 | - $sent = 0; |
|
| 63 | - $this->lastUsedTransport = null; |
|
| 49 | + /** |
|
| 50 | + * Send the given Message. |
|
| 51 | + * |
|
| 52 | + * Recipient/sender data will be retrieved from the Message API. |
|
| 53 | + * The return value is the number of recipients who were accepted for delivery. |
|
| 54 | + * |
|
| 55 | + * @param string[] $failedRecipients An array of failures by-reference |
|
| 56 | + * |
|
| 57 | + * @return int |
|
| 58 | + */ |
|
| 59 | + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) |
|
| 60 | + { |
|
| 61 | + $maxTransports = \count($this->transports); |
|
| 62 | + $sent = 0; |
|
| 63 | + $this->lastUsedTransport = null; |
|
| 64 | 64 | |
| 65 | - for ($i = 0; $i < $maxTransports |
|
| 66 | - && $transport = $this->getNextTransport(); ++$i) { |
|
| 67 | - try { |
|
| 68 | - if (!$transport->isStarted()) { |
|
| 69 | - $transport->start(); |
|
| 70 | - } |
|
| 65 | + for ($i = 0; $i < $maxTransports |
|
| 66 | + && $transport = $this->getNextTransport(); ++$i) { |
|
| 67 | + try { |
|
| 68 | + if (!$transport->isStarted()) { |
|
| 69 | + $transport->start(); |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - if ($sent = $transport->send($message, $failedRecipients)) { |
|
| 73 | - $this->lastUsedTransport = $transport; |
|
| 72 | + if ($sent = $transport->send($message, $failedRecipients)) { |
|
| 73 | + $this->lastUsedTransport = $transport; |
|
| 74 | 74 | |
| 75 | - return $sent; |
|
| 76 | - } |
|
| 77 | - } catch (Swift_TransportException $e) { |
|
| 78 | - $this->killCurrentTransport(); |
|
| 79 | - } |
|
| 80 | - } |
|
| 75 | + return $sent; |
|
| 76 | + } |
|
| 77 | + } catch (Swift_TransportException $e) { |
|
| 78 | + $this->killCurrentTransport(); |
|
| 79 | + } |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | - if (0 == \count($this->transports)) { |
|
| 83 | - throw new Swift_TransportException('All Transports in FailoverTransport failed, or no Transports available'); |
|
| 84 | - } |
|
| 82 | + if (0 == \count($this->transports)) { |
|
| 83 | + throw new Swift_TransportException('All Transports in FailoverTransport failed, or no Transports available'); |
|
| 84 | + } |
|
| 85 | 85 | |
| 86 | - return $sent; |
|
| 87 | - } |
|
| 86 | + return $sent; |
|
| 87 | + } |
|
| 88 | 88 | |
| 89 | - protected function getNextTransport() |
|
| 90 | - { |
|
| 91 | - if (!isset($this->currentTransport)) { |
|
| 92 | - $this->currentTransport = parent::getNextTransport(); |
|
| 93 | - } |
|
| 89 | + protected function getNextTransport() |
|
| 90 | + { |
|
| 91 | + if (!isset($this->currentTransport)) { |
|
| 92 | + $this->currentTransport = parent::getNextTransport(); |
|
| 93 | + } |
|
| 94 | 94 | |
| 95 | - return $this->currentTransport; |
|
| 96 | - } |
|
| 95 | + return $this->currentTransport; |
|
| 96 | + } |
|
| 97 | 97 | |
| 98 | - protected function killCurrentTransport() |
|
| 99 | - { |
|
| 100 | - $this->currentTransport = null; |
|
| 101 | - parent::killCurrentTransport(); |
|
| 102 | - } |
|
| 98 | + protected function killCurrentTransport() |
|
| 99 | + { |
|
| 100 | + $this->currentTransport = null; |
|
| 101 | + parent::killCurrentTransport(); |
|
| 102 | + } |
|
| 103 | 103 | } |
@@ -15,51 +15,51 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | interface Swift_Transport_IoBuffer extends Swift_InputByteStream, Swift_OutputByteStream |
| 17 | 17 | { |
| 18 | - /** A socket buffer over TCP */ |
|
| 19 | - const TYPE_SOCKET = 0x0001; |
|
| 18 | + /** A socket buffer over TCP */ |
|
| 19 | + const TYPE_SOCKET = 0x0001; |
|
| 20 | 20 | |
| 21 | - /** A process buffer with I/O support */ |
|
| 22 | - const TYPE_PROCESS = 0x0010; |
|
| 21 | + /** A process buffer with I/O support */ |
|
| 22 | + const TYPE_PROCESS = 0x0010; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Perform any initialization needed, using the given $params. |
|
| 26 | - * |
|
| 27 | - * Parameters will vary depending upon the type of IoBuffer used. |
|
| 28 | - */ |
|
| 29 | - public function initialize(array $params); |
|
| 24 | + /** |
|
| 25 | + * Perform any initialization needed, using the given $params. |
|
| 26 | + * |
|
| 27 | + * Parameters will vary depending upon the type of IoBuffer used. |
|
| 28 | + */ |
|
| 29 | + public function initialize(array $params); |
|
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * Set an individual param on the buffer (e.g. switching to SSL). |
|
| 33 | - * |
|
| 34 | - * @param string $param |
|
| 35 | - * @param mixed $value |
|
| 36 | - */ |
|
| 37 | - public function setParam($param, $value); |
|
| 31 | + /** |
|
| 32 | + * Set an individual param on the buffer (e.g. switching to SSL). |
|
| 33 | + * |
|
| 34 | + * @param string $param |
|
| 35 | + * @param mixed $value |
|
| 36 | + */ |
|
| 37 | + public function setParam($param, $value); |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * Perform any shutdown logic needed. |
|
| 41 | - */ |
|
| 42 | - public function terminate(); |
|
| 39 | + /** |
|
| 40 | + * Perform any shutdown logic needed. |
|
| 41 | + */ |
|
| 42 | + public function terminate(); |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * Set an array of string replacements which should be made on data written |
|
| 46 | - * to the buffer. |
|
| 47 | - * |
|
| 48 | - * This could replace LF with CRLF for example. |
|
| 49 | - * |
|
| 50 | - * @param string[] $replacements |
|
| 51 | - */ |
|
| 52 | - public function setWriteTranslations(array $replacements); |
|
| 44 | + /** |
|
| 45 | + * Set an array of string replacements which should be made on data written |
|
| 46 | + * to the buffer. |
|
| 47 | + * |
|
| 48 | + * This could replace LF with CRLF for example. |
|
| 49 | + * |
|
| 50 | + * @param string[] $replacements |
|
| 51 | + */ |
|
| 52 | + public function setWriteTranslations(array $replacements); |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * Get a line of output (including any CRLF). |
|
| 56 | - * |
|
| 57 | - * The $sequence number comes from any writes and may or may not be used |
|
| 58 | - * depending upon the implementation. |
|
| 59 | - * |
|
| 60 | - * @param int $sequence of last write to scan from |
|
| 61 | - * |
|
| 62 | - * @return string |
|
| 63 | - */ |
|
| 64 | - public function readLine($sequence); |
|
| 54 | + /** |
|
| 55 | + * Get a line of output (including any CRLF). |
|
| 56 | + * |
|
| 57 | + * The $sequence number comes from any writes and may or may not be used |
|
| 58 | + * depending upon the implementation. |
|
| 59 | + * |
|
| 60 | + * @param int $sequence of last write to scan from |
|
| 61 | + * |
|
| 62 | + * @return string |
|
| 63 | + */ |
|
| 64 | + public function readLine($sequence); |
|
| 65 | 65 | } |
@@ -15,84 +15,84 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Swift_Transport_NullTransport implements Swift_Transport |
| 17 | 17 | { |
| 18 | - /** The event dispatcher from the plugin API */ |
|
| 19 | - private $eventDispatcher; |
|
| 18 | + /** The event dispatcher from the plugin API */ |
|
| 19 | + private $eventDispatcher; |
|
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * Constructor. |
|
| 23 | - */ |
|
| 24 | - public function __construct(Swift_Events_EventDispatcher $eventDispatcher) |
|
| 25 | - { |
|
| 26 | - $this->eventDispatcher = $eventDispatcher; |
|
| 27 | - } |
|
| 21 | + /** |
|
| 22 | + * Constructor. |
|
| 23 | + */ |
|
| 24 | + public function __construct(Swift_Events_EventDispatcher $eventDispatcher) |
|
| 25 | + { |
|
| 26 | + $this->eventDispatcher = $eventDispatcher; |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * Tests if this Transport mechanism has started. |
|
| 31 | - * |
|
| 32 | - * @return bool |
|
| 33 | - */ |
|
| 34 | - public function isStarted() |
|
| 35 | - { |
|
| 36 | - return true; |
|
| 37 | - } |
|
| 29 | + /** |
|
| 30 | + * Tests if this Transport mechanism has started. |
|
| 31 | + * |
|
| 32 | + * @return bool |
|
| 33 | + */ |
|
| 34 | + public function isStarted() |
|
| 35 | + { |
|
| 36 | + return true; |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * Starts this Transport mechanism. |
|
| 41 | - */ |
|
| 42 | - public function start() |
|
| 43 | - { |
|
| 44 | - } |
|
| 39 | + /** |
|
| 40 | + * Starts this Transport mechanism. |
|
| 41 | + */ |
|
| 42 | + public function start() |
|
| 43 | + { |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * Stops this Transport mechanism. |
|
| 48 | - */ |
|
| 49 | - public function stop() |
|
| 50 | - { |
|
| 51 | - } |
|
| 46 | + /** |
|
| 47 | + * Stops this Transport mechanism. |
|
| 48 | + */ |
|
| 49 | + public function stop() |
|
| 50 | + { |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * {@inheritdoc} |
|
| 55 | - */ |
|
| 56 | - public function ping() |
|
| 57 | - { |
|
| 58 | - return true; |
|
| 59 | - } |
|
| 53 | + /** |
|
| 54 | + * {@inheritdoc} |
|
| 55 | + */ |
|
| 56 | + public function ping() |
|
| 57 | + { |
|
| 58 | + return true; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * Sends the given message. |
|
| 63 | - * |
|
| 64 | - * @param string[] $failedRecipients An array of failures by-reference |
|
| 65 | - * |
|
| 66 | - * @return int The number of sent emails |
|
| 67 | - */ |
|
| 68 | - public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) |
|
| 69 | - { |
|
| 70 | - if ($evt = $this->eventDispatcher->createSendEvent($this, $message)) { |
|
| 71 | - $this->eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); |
|
| 72 | - if ($evt->bubbleCancelled()) { |
|
| 73 | - return 0; |
|
| 74 | - } |
|
| 75 | - } |
|
| 61 | + /** |
|
| 62 | + * Sends the given message. |
|
| 63 | + * |
|
| 64 | + * @param string[] $failedRecipients An array of failures by-reference |
|
| 65 | + * |
|
| 66 | + * @return int The number of sent emails |
|
| 67 | + */ |
|
| 68 | + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) |
|
| 69 | + { |
|
| 70 | + if ($evt = $this->eventDispatcher->createSendEvent($this, $message)) { |
|
| 71 | + $this->eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); |
|
| 72 | + if ($evt->bubbleCancelled()) { |
|
| 73 | + return 0; |
|
| 74 | + } |
|
| 75 | + } |
|
| 76 | 76 | |
| 77 | - if ($evt) { |
|
| 78 | - $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); |
|
| 79 | - $this->eventDispatcher->dispatchEvent($evt, 'sendPerformed'); |
|
| 80 | - } |
|
| 77 | + if ($evt) { |
|
| 78 | + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); |
|
| 79 | + $this->eventDispatcher->dispatchEvent($evt, 'sendPerformed'); |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | - $count = ( |
|
| 83 | - \count((array) $message->getTo()) |
|
| 84 | - + \count((array) $message->getCc()) |
|
| 85 | - + \count((array) $message->getBcc()) |
|
| 86 | - ); |
|
| 82 | + $count = ( |
|
| 83 | + \count((array) $message->getTo()) |
|
| 84 | + + \count((array) $message->getCc()) |
|
| 85 | + + \count((array) $message->getBcc()) |
|
| 86 | + ); |
|
| 87 | 87 | |
| 88 | - return $count; |
|
| 89 | - } |
|
| 88 | + return $count; |
|
| 89 | + } |
|
| 90 | 90 | |
| 91 | - /** |
|
| 92 | - * Register a plugin. |
|
| 93 | - */ |
|
| 94 | - public function registerPlugin(Swift_Events_EventListener $plugin) |
|
| 95 | - { |
|
| 96 | - $this->eventDispatcher->bindEventListener($plugin); |
|
| 97 | - } |
|
| 91 | + /** |
|
| 92 | + * Register a plugin. |
|
| 93 | + */ |
|
| 94 | + public function registerPlugin(Swift_Events_EventListener $plugin) |
|
| 95 | + { |
|
| 96 | + $this->eventDispatcher->bindEventListener($plugin); |
|
| 97 | + } |
|
| 98 | 98 | } |
@@ -15,18 +15,18 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | interface Swift_Mailer_RecipientIterator |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * Returns true only if there are more recipients to send to. |
|
| 20 | - * |
|
| 21 | - * @return bool |
|
| 22 | - */ |
|
| 23 | - public function hasNext(); |
|
| 18 | + /** |
|
| 19 | + * Returns true only if there are more recipients to send to. |
|
| 20 | + * |
|
| 21 | + * @return bool |
|
| 22 | + */ |
|
| 23 | + public function hasNext(); |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * Returns an array where the keys are the addresses of recipients and the |
|
| 27 | - * values are the names. e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL). |
|
| 28 | - * |
|
| 29 | - * @return array |
|
| 30 | - */ |
|
| 31 | - public function nextRecipient(); |
|
| 25 | + /** |
|
| 26 | + * Returns an array where the keys are the addresses of recipients and the |
|
| 27 | + * values are the names. e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL). |
|
| 28 | + * |
|
| 29 | + * @return array |
|
| 30 | + */ |
|
| 31 | + public function nextRecipient(); |
|
| 32 | 32 | } |
@@ -15,39 +15,39 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Swift_Mailer_ArrayRecipientIterator implements Swift_Mailer_RecipientIterator |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * The list of recipients. |
|
| 20 | - * |
|
| 21 | - * @var array |
|
| 22 | - */ |
|
| 23 | - private $recipients = []; |
|
| 18 | + /** |
|
| 19 | + * The list of recipients. |
|
| 20 | + * |
|
| 21 | + * @var array |
|
| 22 | + */ |
|
| 23 | + private $recipients = []; |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * Create a new ArrayRecipientIterator from $recipients. |
|
| 27 | - */ |
|
| 28 | - public function __construct(array $recipients) |
|
| 29 | - { |
|
| 30 | - $this->recipients = $recipients; |
|
| 31 | - } |
|
| 25 | + /** |
|
| 26 | + * Create a new ArrayRecipientIterator from $recipients. |
|
| 27 | + */ |
|
| 28 | + public function __construct(array $recipients) |
|
| 29 | + { |
|
| 30 | + $this->recipients = $recipients; |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Returns true only if there are more recipients to send to. |
|
| 35 | - * |
|
| 36 | - * @return bool |
|
| 37 | - */ |
|
| 38 | - public function hasNext() |
|
| 39 | - { |
|
| 40 | - return !empty($this->recipients); |
|
| 41 | - } |
|
| 33 | + /** |
|
| 34 | + * Returns true only if there are more recipients to send to. |
|
| 35 | + * |
|
| 36 | + * @return bool |
|
| 37 | + */ |
|
| 38 | + public function hasNext() |
|
| 39 | + { |
|
| 40 | + return !empty($this->recipients); |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * Returns an array where the keys are the addresses of recipients and the |
|
| 45 | - * values are the names. e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL). |
|
| 46 | - * |
|
| 47 | - * @return array |
|
| 48 | - */ |
|
| 49 | - public function nextRecipient() |
|
| 50 | - { |
|
| 51 | - return array_splice($this->recipients, 0, 1); |
|
| 52 | - } |
|
| 43 | + /** |
|
| 44 | + * Returns an array where the keys are the addresses of recipients and the |
|
| 45 | + * values are the names. e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL). |
|
| 46 | + * |
|
| 47 | + * @return array |
|
| 48 | + */ |
|
| 49 | + public function nextRecipient() |
|
| 50 | + { |
|
| 51 | + return array_splice($this->recipients, 0, 1); |
|
| 52 | + } |
|
| 53 | 53 | } |
@@ -15,33 +15,33 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | interface Swift_KeyCache_KeyCacheInputStream extends Swift_InputByteStream |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * Set the KeyCache to wrap. |
|
| 20 | - */ |
|
| 21 | - public function setKeyCache(Swift_KeyCache $keyCache); |
|
| 18 | + /** |
|
| 19 | + * Set the KeyCache to wrap. |
|
| 20 | + */ |
|
| 21 | + public function setKeyCache(Swift_KeyCache $keyCache); |
|
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Set the nsKey which will be written to. |
|
| 25 | - * |
|
| 26 | - * @param string $nsKey |
|
| 27 | - */ |
|
| 28 | - public function setNsKey($nsKey); |
|
| 23 | + /** |
|
| 24 | + * Set the nsKey which will be written to. |
|
| 25 | + * |
|
| 26 | + * @param string $nsKey |
|
| 27 | + */ |
|
| 28 | + public function setNsKey($nsKey); |
|
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * Set the itemKey which will be written to. |
|
| 32 | - * |
|
| 33 | - * @param string $itemKey |
|
| 34 | - */ |
|
| 35 | - public function setItemKey($itemKey); |
|
| 30 | + /** |
|
| 31 | + * Set the itemKey which will be written to. |
|
| 32 | + * |
|
| 33 | + * @param string $itemKey |
|
| 34 | + */ |
|
| 35 | + public function setItemKey($itemKey); |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * Specify a stream to write through for each write(). |
|
| 39 | - */ |
|
| 40 | - public function setWriteThroughStream(Swift_InputByteStream $is); |
|
| 37 | + /** |
|
| 38 | + * Specify a stream to write through for each write(). |
|
| 39 | + */ |
|
| 40 | + public function setWriteThroughStream(Swift_InputByteStream $is); |
|
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * Any implementation should be cloneable, allowing the clone to access a |
|
| 44 | - * separate $nsKey and $itemKey. |
|
| 45 | - */ |
|
| 46 | - public function __clone(); |
|
| 42 | + /** |
|
| 43 | + * Any implementation should be cloneable, allowing the clone to access a |
|
| 44 | + * separate $nsKey and $itemKey. |
|
| 45 | + */ |
|
| 46 | + public function __clone(); |
|
| 47 | 47 | } |