@@ -15,17 +15,17 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | interface Swift_Plugins_Reporter |
| 17 | 17 | { |
| 18 | - /** The recipient was accepted for delivery */ |
|
| 19 | - const RESULT_PASS = 0x01; |
|
| 18 | + /** The recipient was accepted for delivery */ |
|
| 19 | + const RESULT_PASS = 0x01; |
|
| 20 | 20 | |
| 21 | - /** The recipient could not be accepted */ |
|
| 22 | - const RESULT_FAIL = 0x10; |
|
| 21 | + /** The recipient could not be accepted */ |
|
| 22 | + const RESULT_FAIL = 0x10; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Notifies this ReportNotifier that $address failed or succeeded. |
|
| 26 | - * |
|
| 27 | - * @param string $address |
|
| 28 | - * @param int $result from {@link RESULT_PASS, RESULT_FAIL} |
|
| 29 | - */ |
|
| 30 | - public function notify(Swift_Mime_SimpleMessage $message, $address, $result); |
|
| 24 | + /** |
|
| 25 | + * Notifies this ReportNotifier that $address failed or succeeded. |
|
| 26 | + * |
|
| 27 | + * @param string $address |
|
| 28 | + * @param int $result from {@link RESULT_PASS, RESULT_FAIL} |
|
| 29 | + */ |
|
| 30 | + public function notify(Swift_Mime_SimpleMessage $message, $address, $result); |
|
| 31 | 31 | } |
@@ -15,13 +15,13 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Swift_DependencyException extends Swift_SwiftException |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * Create a new DependencyException with $message. |
|
| 20 | - * |
|
| 21 | - * @param string $message |
|
| 22 | - */ |
|
| 23 | - public function __construct($message) |
|
| 24 | - { |
|
| 25 | - parent::__construct($message); |
|
| 26 | - } |
|
| 18 | + /** |
|
| 19 | + * Create a new DependencyException with $message. |
|
| 20 | + * |
|
| 21 | + * @param string $message |
|
| 22 | + */ |
|
| 23 | + public function __construct($message) |
|
| 24 | + { |
|
| 25 | + parent::__construct($message); |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -15,110 +15,110 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Swift_CharacterReaderFactory_SimpleCharacterReaderFactory implements Swift_CharacterReaderFactory |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * A map of charset patterns to their implementation classes. |
|
| 20 | - * |
|
| 21 | - * @var array |
|
| 22 | - */ |
|
| 23 | - private static $map = []; |
|
| 24 | - |
|
| 25 | - /** |
|
| 26 | - * Factories which have already been loaded. |
|
| 27 | - * |
|
| 28 | - * @var Swift_CharacterReaderFactory[] |
|
| 29 | - */ |
|
| 30 | - private static $loaded = []; |
|
| 31 | - |
|
| 32 | - /** |
|
| 33 | - * Creates a new CharacterReaderFactory. |
|
| 34 | - */ |
|
| 35 | - public function __construct() |
|
| 36 | - { |
|
| 37 | - $this->init(); |
|
| 38 | - } |
|
| 39 | - |
|
| 40 | - public function __wakeup() |
|
| 41 | - { |
|
| 42 | - $this->init(); |
|
| 43 | - } |
|
| 44 | - |
|
| 45 | - public function init() |
|
| 46 | - { |
|
| 47 | - if (\count(self::$map) > 0) { |
|
| 48 | - return; |
|
| 49 | - } |
|
| 50 | - |
|
| 51 | - $prefix = 'Swift_CharacterReader_'; |
|
| 52 | - |
|
| 53 | - $singleByte = [ |
|
| 54 | - 'class' => $prefix.'GenericFixedWidthReader', |
|
| 55 | - 'constructor' => [1], |
|
| 56 | - ]; |
|
| 57 | - |
|
| 58 | - $doubleByte = [ |
|
| 59 | - 'class' => $prefix.'GenericFixedWidthReader', |
|
| 60 | - 'constructor' => [2], |
|
| 61 | - ]; |
|
| 62 | - |
|
| 63 | - $fourBytes = [ |
|
| 64 | - 'class' => $prefix.'GenericFixedWidthReader', |
|
| 65 | - 'constructor' => [4], |
|
| 66 | - ]; |
|
| 67 | - |
|
| 68 | - // Utf-8 |
|
| 69 | - self::$map['utf-?8'] = [ |
|
| 70 | - 'class' => $prefix.'Utf8Reader', |
|
| 71 | - 'constructor' => [], |
|
| 72 | - ]; |
|
| 73 | - |
|
| 74 | - //7-8 bit charsets |
|
| 75 | - self::$map['(us-)?ascii'] = $singleByte; |
|
| 76 | - self::$map['(iso|iec)-?8859-?[0-9]+'] = $singleByte; |
|
| 77 | - self::$map['windows-?125[0-9]'] = $singleByte; |
|
| 78 | - self::$map['cp-?[0-9]+'] = $singleByte; |
|
| 79 | - self::$map['ansi'] = $singleByte; |
|
| 80 | - self::$map['macintosh'] = $singleByte; |
|
| 81 | - self::$map['koi-?7'] = $singleByte; |
|
| 82 | - self::$map['koi-?8-?.+'] = $singleByte; |
|
| 83 | - self::$map['mik'] = $singleByte; |
|
| 84 | - self::$map['(cork|t1)'] = $singleByte; |
|
| 85 | - self::$map['v?iscii'] = $singleByte; |
|
| 86 | - |
|
| 87 | - //16 bits |
|
| 88 | - self::$map['(ucs-?2|utf-?16)'] = $doubleByte; |
|
| 89 | - |
|
| 90 | - //32 bits |
|
| 91 | - self::$map['(ucs-?4|utf-?32)'] = $fourBytes; |
|
| 92 | - |
|
| 93 | - // Fallback |
|
| 94 | - self::$map['.*'] = $singleByte; |
|
| 95 | - } |
|
| 96 | - |
|
| 97 | - /** |
|
| 98 | - * Returns a CharacterReader suitable for the charset applied. |
|
| 99 | - * |
|
| 100 | - * @param string $charset |
|
| 101 | - * |
|
| 102 | - * @return Swift_CharacterReader |
|
| 103 | - */ |
|
| 104 | - public function getReaderFor($charset) |
|
| 105 | - { |
|
| 106 | - $charset = strtolower(trim($charset ?? '')); |
|
| 107 | - foreach (self::$map as $pattern => $spec) { |
|
| 108 | - $re = '/^'.$pattern.'$/D'; |
|
| 109 | - if (preg_match($re, $charset)) { |
|
| 110 | - if (!\array_key_exists($pattern, self::$loaded)) { |
|
| 111 | - $reflector = new ReflectionClass($spec['class']); |
|
| 112 | - if ($reflector->getConstructor()) { |
|
| 113 | - $reader = $reflector->newInstanceArgs($spec['constructor']); |
|
| 114 | - } else { |
|
| 115 | - $reader = $reflector->newInstance(); |
|
| 116 | - } |
|
| 117 | - self::$loaded[$pattern] = $reader; |
|
| 118 | - } |
|
| 119 | - |
|
| 120 | - return self::$loaded[$pattern]; |
|
| 121 | - } |
|
| 122 | - } |
|
| 123 | - } |
|
| 18 | + /** |
|
| 19 | + * A map of charset patterns to their implementation classes. |
|
| 20 | + * |
|
| 21 | + * @var array |
|
| 22 | + */ |
|
| 23 | + private static $map = []; |
|
| 24 | + |
|
| 25 | + /** |
|
| 26 | + * Factories which have already been loaded. |
|
| 27 | + * |
|
| 28 | + * @var Swift_CharacterReaderFactory[] |
|
| 29 | + */ |
|
| 30 | + private static $loaded = []; |
|
| 31 | + |
|
| 32 | + /** |
|
| 33 | + * Creates a new CharacterReaderFactory. |
|
| 34 | + */ |
|
| 35 | + public function __construct() |
|
| 36 | + { |
|
| 37 | + $this->init(); |
|
| 38 | + } |
|
| 39 | + |
|
| 40 | + public function __wakeup() |
|
| 41 | + { |
|
| 42 | + $this->init(); |
|
| 43 | + } |
|
| 44 | + |
|
| 45 | + public function init() |
|
| 46 | + { |
|
| 47 | + if (\count(self::$map) > 0) { |
|
| 48 | + return; |
|
| 49 | + } |
|
| 50 | + |
|
| 51 | + $prefix = 'Swift_CharacterReader_'; |
|
| 52 | + |
|
| 53 | + $singleByte = [ |
|
| 54 | + 'class' => $prefix.'GenericFixedWidthReader', |
|
| 55 | + 'constructor' => [1], |
|
| 56 | + ]; |
|
| 57 | + |
|
| 58 | + $doubleByte = [ |
|
| 59 | + 'class' => $prefix.'GenericFixedWidthReader', |
|
| 60 | + 'constructor' => [2], |
|
| 61 | + ]; |
|
| 62 | + |
|
| 63 | + $fourBytes = [ |
|
| 64 | + 'class' => $prefix.'GenericFixedWidthReader', |
|
| 65 | + 'constructor' => [4], |
|
| 66 | + ]; |
|
| 67 | + |
|
| 68 | + // Utf-8 |
|
| 69 | + self::$map['utf-?8'] = [ |
|
| 70 | + 'class' => $prefix.'Utf8Reader', |
|
| 71 | + 'constructor' => [], |
|
| 72 | + ]; |
|
| 73 | + |
|
| 74 | + //7-8 bit charsets |
|
| 75 | + self::$map['(us-)?ascii'] = $singleByte; |
|
| 76 | + self::$map['(iso|iec)-?8859-?[0-9]+'] = $singleByte; |
|
| 77 | + self::$map['windows-?125[0-9]'] = $singleByte; |
|
| 78 | + self::$map['cp-?[0-9]+'] = $singleByte; |
|
| 79 | + self::$map['ansi'] = $singleByte; |
|
| 80 | + self::$map['macintosh'] = $singleByte; |
|
| 81 | + self::$map['koi-?7'] = $singleByte; |
|
| 82 | + self::$map['koi-?8-?.+'] = $singleByte; |
|
| 83 | + self::$map['mik'] = $singleByte; |
|
| 84 | + self::$map['(cork|t1)'] = $singleByte; |
|
| 85 | + self::$map['v?iscii'] = $singleByte; |
|
| 86 | + |
|
| 87 | + //16 bits |
|
| 88 | + self::$map['(ucs-?2|utf-?16)'] = $doubleByte; |
|
| 89 | + |
|
| 90 | + //32 bits |
|
| 91 | + self::$map['(ucs-?4|utf-?32)'] = $fourBytes; |
|
| 92 | + |
|
| 93 | + // Fallback |
|
| 94 | + self::$map['.*'] = $singleByte; |
|
| 95 | + } |
|
| 96 | + |
|
| 97 | + /** |
|
| 98 | + * Returns a CharacterReader suitable for the charset applied. |
|
| 99 | + * |
|
| 100 | + * @param string $charset |
|
| 101 | + * |
|
| 102 | + * @return Swift_CharacterReader |
|
| 103 | + */ |
|
| 104 | + public function getReaderFor($charset) |
|
| 105 | + { |
|
| 106 | + $charset = strtolower(trim($charset ?? '')); |
|
| 107 | + foreach (self::$map as $pattern => $spec) { |
|
| 108 | + $re = '/^'.$pattern.'$/D'; |
|
| 109 | + if (preg_match($re, $charset)) { |
|
| 110 | + if (!\array_key_exists($pattern, self::$loaded)) { |
|
| 111 | + $reflector = new ReflectionClass($spec['class']); |
|
| 112 | + if ($reflector->getConstructor()) { |
|
| 113 | + $reader = $reflector->newInstanceArgs($spec['constructor']); |
|
| 114 | + } else { |
|
| 115 | + $reader = $reflector->newInstance(); |
|
| 116 | + } |
|
| 117 | + self::$loaded[$pattern] = $reader; |
|
| 118 | + } |
|
| 119 | + |
|
| 120 | + return self::$loaded[$pattern]; |
|
| 121 | + } |
|
| 122 | + } |
|
| 123 | + } |
|
| 124 | 124 | } |
@@ -15,62 +15,62 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | interface Swift_Transport |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * Test if this Transport mechanism has started. |
|
| 20 | - * |
|
| 21 | - * @return bool |
|
| 22 | - */ |
|
| 23 | - public function isStarted(); |
|
| 18 | + /** |
|
| 19 | + * Test if this Transport mechanism has started. |
|
| 20 | + * |
|
| 21 | + * @return bool |
|
| 22 | + */ |
|
| 23 | + public function isStarted(); |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * Start this Transport mechanism. |
|
| 27 | - */ |
|
| 28 | - public function start(); |
|
| 25 | + /** |
|
| 26 | + * Start this Transport mechanism. |
|
| 27 | + */ |
|
| 28 | + public function start(); |
|
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * Stop this Transport mechanism. |
|
| 32 | - */ |
|
| 33 | - public function stop(); |
|
| 30 | + /** |
|
| 31 | + * Stop this Transport mechanism. |
|
| 32 | + */ |
|
| 33 | + public function stop(); |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Check if this Transport mechanism is alive. |
|
| 37 | - * |
|
| 38 | - * If a Transport mechanism session is no longer functional, the method |
|
| 39 | - * returns FALSE. It is the responsibility of the developer to handle this |
|
| 40 | - * case and restart the Transport mechanism manually. |
|
| 41 | - * |
|
| 42 | - * @example |
|
| 43 | - * |
|
| 44 | - * if (!$transport->ping()) { |
|
| 45 | - * $transport->stop(); |
|
| 46 | - * $transport->start(); |
|
| 47 | - * } |
|
| 48 | - * |
|
| 49 | - * The Transport mechanism will be started, if it is not already. |
|
| 50 | - * |
|
| 51 | - * It is undefined if the Transport mechanism attempts to restart as long as |
|
| 52 | - * the return value reflects whether the mechanism is now functional. |
|
| 53 | - * |
|
| 54 | - * @return bool TRUE if the transport is alive |
|
| 55 | - */ |
|
| 56 | - public function ping(); |
|
| 35 | + /** |
|
| 36 | + * Check if this Transport mechanism is alive. |
|
| 37 | + * |
|
| 38 | + * If a Transport mechanism session is no longer functional, the method |
|
| 39 | + * returns FALSE. It is the responsibility of the developer to handle this |
|
| 40 | + * case and restart the Transport mechanism manually. |
|
| 41 | + * |
|
| 42 | + * @example |
|
| 43 | + * |
|
| 44 | + * if (!$transport->ping()) { |
|
| 45 | + * $transport->stop(); |
|
| 46 | + * $transport->start(); |
|
| 47 | + * } |
|
| 48 | + * |
|
| 49 | + * The Transport mechanism will be started, if it is not already. |
|
| 50 | + * |
|
| 51 | + * It is undefined if the Transport mechanism attempts to restart as long as |
|
| 52 | + * the return value reflects whether the mechanism is now functional. |
|
| 53 | + * |
|
| 54 | + * @return bool TRUE if the transport is alive |
|
| 55 | + */ |
|
| 56 | + public function ping(); |
|
| 57 | 57 | |
| 58 | - /** |
|
| 59 | - * Send the given Message. |
|
| 60 | - * |
|
| 61 | - * Recipient/sender data will be retrieved from the Message API. |
|
| 62 | - * The return value is the number of recipients who were accepted for delivery. |
|
| 63 | - * |
|
| 64 | - * This is the responsibility of the send method to start the transport if needed. |
|
| 65 | - * |
|
| 66 | - * @param string[] $failedRecipients An array of failures by-reference |
|
| 67 | - * |
|
| 68 | - * @return int |
|
| 69 | - */ |
|
| 70 | - public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null); |
|
| 58 | + /** |
|
| 59 | + * Send the given Message. |
|
| 60 | + * |
|
| 61 | + * Recipient/sender data will be retrieved from the Message API. |
|
| 62 | + * The return value is the number of recipients who were accepted for delivery. |
|
| 63 | + * |
|
| 64 | + * This is the responsibility of the send method to start the transport if needed. |
|
| 65 | + * |
|
| 66 | + * @param string[] $failedRecipients An array of failures by-reference |
|
| 67 | + * |
|
| 68 | + * @return int |
|
| 69 | + */ |
|
| 70 | + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null); |
|
| 71 | 71 | |
| 72 | - /** |
|
| 73 | - * Register a plugin in the Transport. |
|
| 74 | - */ |
|
| 75 | - public function registerPlugin(Swift_Events_EventListener $plugin); |
|
| 72 | + /** |
|
| 73 | + * Register a plugin in the Transport. |
|
| 74 | + */ |
|
| 75 | + public function registerPlugin(Swift_Events_EventListener $plugin); |
|
| 76 | 76 | } |
@@ -15,49 +15,49 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | abstract class Swift_ConfigurableSpool implements Swift_Spool |
| 17 | 17 | { |
| 18 | - /** The maximum number of messages to send per flush */ |
|
| 19 | - private $message_limit; |
|
| 18 | + /** The maximum number of messages to send per flush */ |
|
| 19 | + private $message_limit; |
|
| 20 | 20 | |
| 21 | - /** The time limit per flush */ |
|
| 22 | - private $time_limit; |
|
| 21 | + /** The time limit per flush */ |
|
| 22 | + private $time_limit; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Sets the maximum number of messages to send per flush. |
|
| 26 | - * |
|
| 27 | - * @param int $limit |
|
| 28 | - */ |
|
| 29 | - public function setMessageLimit($limit) |
|
| 30 | - { |
|
| 31 | - $this->message_limit = (int) $limit; |
|
| 32 | - } |
|
| 24 | + /** |
|
| 25 | + * Sets the maximum number of messages to send per flush. |
|
| 26 | + * |
|
| 27 | + * @param int $limit |
|
| 28 | + */ |
|
| 29 | + public function setMessageLimit($limit) |
|
| 30 | + { |
|
| 31 | + $this->message_limit = (int) $limit; |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * Gets the maximum number of messages to send per flush. |
|
| 36 | - * |
|
| 37 | - * @return int The limit |
|
| 38 | - */ |
|
| 39 | - public function getMessageLimit() |
|
| 40 | - { |
|
| 41 | - return $this->message_limit; |
|
| 42 | - } |
|
| 34 | + /** |
|
| 35 | + * Gets the maximum number of messages to send per flush. |
|
| 36 | + * |
|
| 37 | + * @return int The limit |
|
| 38 | + */ |
|
| 39 | + public function getMessageLimit() |
|
| 40 | + { |
|
| 41 | + return $this->message_limit; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * Sets the time limit (in seconds) per flush. |
|
| 46 | - * |
|
| 47 | - * @param int $limit The limit |
|
| 48 | - */ |
|
| 49 | - public function setTimeLimit($limit) |
|
| 50 | - { |
|
| 51 | - $this->time_limit = (int) $limit; |
|
| 52 | - } |
|
| 44 | + /** |
|
| 45 | + * Sets the time limit (in seconds) per flush. |
|
| 46 | + * |
|
| 47 | + * @param int $limit The limit |
|
| 48 | + */ |
|
| 49 | + public function setTimeLimit($limit) |
|
| 50 | + { |
|
| 51 | + $this->time_limit = (int) $limit; |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * Gets the time limit (in seconds) per flush. |
|
| 56 | - * |
|
| 57 | - * @return int The limit |
|
| 58 | - */ |
|
| 59 | - public function getTimeLimit() |
|
| 60 | - { |
|
| 61 | - return $this->time_limit; |
|
| 62 | - } |
|
| 54 | + /** |
|
| 55 | + * Gets the time limit (in seconds) per flush. |
|
| 56 | + * |
|
| 57 | + * @return int The limit |
|
| 58 | + */ |
|
| 59 | + public function getTimeLimit() |
|
| 60 | + { |
|
| 61 | + return $this->time_limit; |
|
| 62 | + } |
|
| 63 | 63 | } |
@@ -15,50 +15,50 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Swift_Events_CommandEvent extends Swift_Events_EventObject |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * The command sent to the server. |
|
| 20 | - * |
|
| 21 | - * @var string |
|
| 22 | - */ |
|
| 23 | - private $command; |
|
| 18 | + /** |
|
| 19 | + * The command sent to the server. |
|
| 20 | + * |
|
| 21 | + * @var string |
|
| 22 | + */ |
|
| 23 | + private $command; |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * An array of codes which a successful response will contain. |
|
| 27 | - * |
|
| 28 | - * @var int[] |
|
| 29 | - */ |
|
| 30 | - private $successCodes = []; |
|
| 25 | + /** |
|
| 26 | + * An array of codes which a successful response will contain. |
|
| 27 | + * |
|
| 28 | + * @var int[] |
|
| 29 | + */ |
|
| 30 | + private $successCodes = []; |
|
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * Create a new CommandEvent for $source with $command. |
|
| 34 | - * |
|
| 35 | - * @param string $command |
|
| 36 | - * @param array $successCodes |
|
| 37 | - */ |
|
| 38 | - public function __construct(Swift_Transport $source, $command, $successCodes = []) |
|
| 39 | - { |
|
| 40 | - parent::__construct($source); |
|
| 41 | - $this->command = $command; |
|
| 42 | - $this->successCodes = $successCodes; |
|
| 43 | - } |
|
| 32 | + /** |
|
| 33 | + * Create a new CommandEvent for $source with $command. |
|
| 34 | + * |
|
| 35 | + * @param string $command |
|
| 36 | + * @param array $successCodes |
|
| 37 | + */ |
|
| 38 | + public function __construct(Swift_Transport $source, $command, $successCodes = []) |
|
| 39 | + { |
|
| 40 | + parent::__construct($source); |
|
| 41 | + $this->command = $command; |
|
| 42 | + $this->successCodes = $successCodes; |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * Get the command which was sent to the server. |
|
| 47 | - * |
|
| 48 | - * @return string |
|
| 49 | - */ |
|
| 50 | - public function getCommand() |
|
| 51 | - { |
|
| 52 | - return $this->command; |
|
| 53 | - } |
|
| 45 | + /** |
|
| 46 | + * Get the command which was sent to the server. |
|
| 47 | + * |
|
| 48 | + * @return string |
|
| 49 | + */ |
|
| 50 | + public function getCommand() |
|
| 51 | + { |
|
| 52 | + return $this->command; |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - /** |
|
| 56 | - * Get the numeric response codes which indicate success for this command. |
|
| 57 | - * |
|
| 58 | - * @return int[] |
|
| 59 | - */ |
|
| 60 | - public function getSuccessCodes() |
|
| 61 | - { |
|
| 62 | - return $this->successCodes; |
|
| 63 | - } |
|
| 55 | + /** |
|
| 56 | + * Get the numeric response codes which indicate success for this command. |
|
| 57 | + * |
|
| 58 | + * @return int[] |
|
| 59 | + */ |
|
| 60 | + public function getSuccessCodes() |
|
| 61 | + { |
|
| 62 | + return $this->successCodes; |
|
| 63 | + } |
|
| 64 | 64 | } |
@@ -15,13 +15,13 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Swift_Events_TransportChangeEvent extends Swift_Events_EventObject |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * Get the Transport. |
|
| 20 | - * |
|
| 21 | - * @return Swift_Transport |
|
| 22 | - */ |
|
| 23 | - public function getTransport() |
|
| 24 | - { |
|
| 25 | - return $this->getSource(); |
|
| 26 | - } |
|
| 18 | + /** |
|
| 19 | + * Get the Transport. |
|
| 20 | + * |
|
| 21 | + * @return Swift_Transport |
|
| 22 | + */ |
|
| 23 | + public function getTransport() |
|
| 24 | + { |
|
| 25 | + return $this->getSource(); |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -15,23 +15,23 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | interface Swift_Events_TransportChangeListener extends Swift_Events_EventListener |
| 17 | 17 | { |
| 18 | - /** |
|
| 19 | - * Invoked just before a Transport is started. |
|
| 20 | - */ |
|
| 21 | - public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt); |
|
| 18 | + /** |
|
| 19 | + * Invoked just before a Transport is started. |
|
| 20 | + */ |
|
| 21 | + public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt); |
|
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Invoked immediately after the Transport is started. |
|
| 25 | - */ |
|
| 26 | - public function transportStarted(Swift_Events_TransportChangeEvent $evt); |
|
| 23 | + /** |
|
| 24 | + * Invoked immediately after the Transport is started. |
|
| 25 | + */ |
|
| 26 | + public function transportStarted(Swift_Events_TransportChangeEvent $evt); |
|
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * Invoked just before a Transport is stopped. |
|
| 30 | - */ |
|
| 31 | - public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt); |
|
| 28 | + /** |
|
| 29 | + * Invoked just before a Transport is stopped. |
|
| 30 | + */ |
|
| 31 | + public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt); |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Invoked immediately after the Transport is stopped. |
|
| 35 | - */ |
|
| 36 | - public function transportStopped(Swift_Events_TransportChangeEvent $evt); |
|
| 33 | + /** |
|
| 34 | + * Invoked immediately after the Transport is stopped. |
|
| 35 | + */ |
|
| 36 | + public function transportStopped(Swift_Events_TransportChangeEvent $evt); |
|
| 37 | 37 | } |
@@ -15,47 +15,47 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class Swift_Events_EventObject implements Swift_Events_Event |
| 17 | 17 | { |
| 18 | - /** The source of this Event */ |
|
| 19 | - private $source; |
|
| 18 | + /** The source of this Event */ |
|
| 19 | + private $source; |
|
| 20 | 20 | |
| 21 | - /** The state of this Event (should it bubble up the stack?) */ |
|
| 22 | - private $bubbleCancelled = false; |
|
| 21 | + /** The state of this Event (should it bubble up the stack?) */ |
|
| 22 | + private $bubbleCancelled = false; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Create a new EventObject originating at $source. |
|
| 26 | - * |
|
| 27 | - * @param object $source |
|
| 28 | - */ |
|
| 29 | - public function __construct($source) |
|
| 30 | - { |
|
| 31 | - $this->source = $source; |
|
| 32 | - } |
|
| 24 | + /** |
|
| 25 | + * Create a new EventObject originating at $source. |
|
| 26 | + * |
|
| 27 | + * @param object $source |
|
| 28 | + */ |
|
| 29 | + public function __construct($source) |
|
| 30 | + { |
|
| 31 | + $this->source = $source; |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * Get the source object of this event. |
|
| 36 | - * |
|
| 37 | - * @return object |
|
| 38 | - */ |
|
| 39 | - public function getSource() |
|
| 40 | - { |
|
| 41 | - return $this->source; |
|
| 42 | - } |
|
| 34 | + /** |
|
| 35 | + * Get the source object of this event. |
|
| 36 | + * |
|
| 37 | + * @return object |
|
| 38 | + */ |
|
| 39 | + public function getSource() |
|
| 40 | + { |
|
| 41 | + return $this->source; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * Prevent this Event from bubbling any further up the stack. |
|
| 46 | - */ |
|
| 47 | - public function cancelBubble($cancel = true) |
|
| 48 | - { |
|
| 49 | - $this->bubbleCancelled = $cancel; |
|
| 50 | - } |
|
| 44 | + /** |
|
| 45 | + * Prevent this Event from bubbling any further up the stack. |
|
| 46 | + */ |
|
| 47 | + public function cancelBubble($cancel = true) |
|
| 48 | + { |
|
| 49 | + $this->bubbleCancelled = $cancel; |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * Returns true if this Event will not bubble any further up the stack. |
|
| 54 | - * |
|
| 55 | - * @return bool |
|
| 56 | - */ |
|
| 57 | - public function bubbleCancelled() |
|
| 58 | - { |
|
| 59 | - return $this->bubbleCancelled; |
|
| 60 | - } |
|
| 52 | + /** |
|
| 53 | + * Returns true if this Event will not bubble any further up the stack. |
|
| 54 | + * |
|
| 55 | + * @return bool |
|
| 56 | + */ |
|
| 57 | + public function bubbleCancelled() |
|
| 58 | + { |
|
| 59 | + return $this->bubbleCancelled; |
|
| 60 | + } |
|
| 61 | 61 | } |