@@ -15,182 +15,182 @@ |
||
15 | 15 | */ |
16 | 16 | class Swift_Plugins_ThrottlerPlugin extends Swift_Plugins_BandwidthMonitorPlugin implements Swift_Plugins_Sleeper, Swift_Plugins_Timer |
17 | 17 | { |
18 | - /** Flag for throttling in bytes per minute */ |
|
19 | - const BYTES_PER_MINUTE = 0x01; |
|
20 | - |
|
21 | - /** Flag for throttling in emails per second (Amazon SES) */ |
|
22 | - const MESSAGES_PER_SECOND = 0x11; |
|
23 | - |
|
24 | - /** Flag for throttling in emails per minute */ |
|
25 | - const MESSAGES_PER_MINUTE = 0x10; |
|
26 | - |
|
27 | - /** |
|
28 | - * The Sleeper instance for sleeping. |
|
29 | - * |
|
30 | - * @var Swift_Plugins_Sleeper |
|
31 | - */ |
|
32 | - private $sleeper; |
|
33 | - |
|
34 | - /** |
|
35 | - * The Timer instance which provides the timestamp. |
|
36 | - * |
|
37 | - * @var Swift_Plugins_Timer |
|
38 | - */ |
|
39 | - private $timer; |
|
40 | - |
|
41 | - /** |
|
42 | - * The time at which the first email was sent. |
|
43 | - * |
|
44 | - * @var int |
|
45 | - */ |
|
46 | - private $start; |
|
47 | - |
|
48 | - /** |
|
49 | - * The rate at which messages should be sent. |
|
50 | - * |
|
51 | - * @var int |
|
52 | - */ |
|
53 | - private $rate; |
|
54 | - |
|
55 | - /** |
|
56 | - * The mode for throttling. |
|
57 | - * |
|
58 | - * This is {@link BYTES_PER_MINUTE} or {@link MESSAGES_PER_MINUTE} |
|
59 | - * |
|
60 | - * @var int |
|
61 | - */ |
|
62 | - private $mode; |
|
63 | - |
|
64 | - /** |
|
65 | - * An internal counter of the number of messages sent. |
|
66 | - * |
|
67 | - * @var int |
|
68 | - */ |
|
69 | - private $messages = 0; |
|
70 | - |
|
71 | - /** |
|
72 | - * Create a new ThrottlerPlugin. |
|
73 | - * |
|
74 | - * @param int $rate |
|
75 | - * @param int $mode defaults to {@link BYTES_PER_MINUTE} |
|
76 | - * @param Swift_Plugins_Sleeper $sleeper (only needed in testing) |
|
77 | - * @param Swift_Plugins_Timer $timer (only needed in testing) |
|
78 | - */ |
|
79 | - public function __construct($rate, $mode = self::BYTES_PER_MINUTE, Swift_Plugins_Sleeper $sleeper = null, Swift_Plugins_Timer $timer = null) |
|
80 | - { |
|
81 | - $this->rate = $rate; |
|
82 | - $this->mode = $mode; |
|
83 | - $this->sleeper = $sleeper; |
|
84 | - $this->timer = $timer; |
|
85 | - } |
|
86 | - |
|
87 | - /** |
|
88 | - * Invoked immediately before the Message is sent. |
|
89 | - */ |
|
90 | - public function beforeSendPerformed(Swift_Events_SendEvent $evt) |
|
91 | - { |
|
92 | - $time = $this->getTimestamp(); |
|
93 | - if (!isset($this->start)) { |
|
94 | - $this->start = $time; |
|
95 | - } |
|
96 | - $duration = $time - $this->start; |
|
97 | - |
|
98 | - switch ($this->mode) { |
|
99 | - case self::BYTES_PER_MINUTE: |
|
100 | - $sleep = $this->throttleBytesPerMinute($duration); |
|
101 | - break; |
|
102 | - case self::MESSAGES_PER_SECOND: |
|
103 | - $sleep = $this->throttleMessagesPerSecond($duration); |
|
104 | - break; |
|
105 | - case self::MESSAGES_PER_MINUTE: |
|
106 | - $sleep = $this->throttleMessagesPerMinute($duration); |
|
107 | - break; |
|
108 | - default: |
|
109 | - $sleep = 0; |
|
110 | - break; |
|
111 | - } |
|
112 | - |
|
113 | - if ($sleep > 0) { |
|
114 | - $this->sleep($sleep); |
|
115 | - } |
|
116 | - } |
|
117 | - |
|
118 | - /** |
|
119 | - * Invoked when a Message is sent. |
|
120 | - */ |
|
121 | - public function sendPerformed(Swift_Events_SendEvent $evt) |
|
122 | - { |
|
123 | - parent::sendPerformed($evt); |
|
124 | - ++$this->messages; |
|
125 | - } |
|
126 | - |
|
127 | - /** |
|
128 | - * Sleep for $seconds. |
|
129 | - * |
|
130 | - * @param int $seconds |
|
131 | - */ |
|
132 | - public function sleep($seconds) |
|
133 | - { |
|
134 | - if (isset($this->sleeper)) { |
|
135 | - $this->sleeper->sleep($seconds); |
|
136 | - } else { |
|
137 | - sleep($seconds); |
|
138 | - } |
|
139 | - } |
|
140 | - |
|
141 | - /** |
|
142 | - * Get the current UNIX timestamp. |
|
143 | - * |
|
144 | - * @return int |
|
145 | - */ |
|
146 | - public function getTimestamp() |
|
147 | - { |
|
148 | - if (isset($this->timer)) { |
|
149 | - return $this->timer->getTimestamp(); |
|
150 | - } |
|
151 | - |
|
152 | - return time(); |
|
153 | - } |
|
154 | - |
|
155 | - /** |
|
156 | - * Get a number of seconds to sleep for. |
|
157 | - * |
|
158 | - * @param int $timePassed |
|
159 | - * |
|
160 | - * @return int |
|
161 | - */ |
|
162 | - private function throttleBytesPerMinute($timePassed) |
|
163 | - { |
|
164 | - $expectedDuration = $this->getBytesOut() / ($this->rate / 60); |
|
165 | - |
|
166 | - return (int) ceil($expectedDuration - $timePassed); |
|
167 | - } |
|
168 | - |
|
169 | - /** |
|
170 | - * Get a number of seconds to sleep for. |
|
171 | - * |
|
172 | - * @param int $timePassed |
|
173 | - * |
|
174 | - * @return int |
|
175 | - */ |
|
176 | - private function throttleMessagesPerSecond($timePassed) |
|
177 | - { |
|
178 | - $expectedDuration = $this->messages / $this->rate; |
|
179 | - |
|
180 | - return (int) ceil($expectedDuration - $timePassed); |
|
181 | - } |
|
182 | - |
|
183 | - /** |
|
184 | - * Get a number of seconds to sleep for. |
|
185 | - * |
|
186 | - * @param int $timePassed |
|
187 | - * |
|
188 | - * @return int |
|
189 | - */ |
|
190 | - private function throttleMessagesPerMinute($timePassed) |
|
191 | - { |
|
192 | - $expectedDuration = $this->messages / ($this->rate / 60); |
|
193 | - |
|
194 | - return (int) ceil($expectedDuration - $timePassed); |
|
195 | - } |
|
18 | + /** Flag for throttling in bytes per minute */ |
|
19 | + const BYTES_PER_MINUTE = 0x01; |
|
20 | + |
|
21 | + /** Flag for throttling in emails per second (Amazon SES) */ |
|
22 | + const MESSAGES_PER_SECOND = 0x11; |
|
23 | + |
|
24 | + /** Flag for throttling in emails per minute */ |
|
25 | + const MESSAGES_PER_MINUTE = 0x10; |
|
26 | + |
|
27 | + /** |
|
28 | + * The Sleeper instance for sleeping. |
|
29 | + * |
|
30 | + * @var Swift_Plugins_Sleeper |
|
31 | + */ |
|
32 | + private $sleeper; |
|
33 | + |
|
34 | + /** |
|
35 | + * The Timer instance which provides the timestamp. |
|
36 | + * |
|
37 | + * @var Swift_Plugins_Timer |
|
38 | + */ |
|
39 | + private $timer; |
|
40 | + |
|
41 | + /** |
|
42 | + * The time at which the first email was sent. |
|
43 | + * |
|
44 | + * @var int |
|
45 | + */ |
|
46 | + private $start; |
|
47 | + |
|
48 | + /** |
|
49 | + * The rate at which messages should be sent. |
|
50 | + * |
|
51 | + * @var int |
|
52 | + */ |
|
53 | + private $rate; |
|
54 | + |
|
55 | + /** |
|
56 | + * The mode for throttling. |
|
57 | + * |
|
58 | + * This is {@link BYTES_PER_MINUTE} or {@link MESSAGES_PER_MINUTE} |
|
59 | + * |
|
60 | + * @var int |
|
61 | + */ |
|
62 | + private $mode; |
|
63 | + |
|
64 | + /** |
|
65 | + * An internal counter of the number of messages sent. |
|
66 | + * |
|
67 | + * @var int |
|
68 | + */ |
|
69 | + private $messages = 0; |
|
70 | + |
|
71 | + /** |
|
72 | + * Create a new ThrottlerPlugin. |
|
73 | + * |
|
74 | + * @param int $rate |
|
75 | + * @param int $mode defaults to {@link BYTES_PER_MINUTE} |
|
76 | + * @param Swift_Plugins_Sleeper $sleeper (only needed in testing) |
|
77 | + * @param Swift_Plugins_Timer $timer (only needed in testing) |
|
78 | + */ |
|
79 | + public function __construct($rate, $mode = self::BYTES_PER_MINUTE, Swift_Plugins_Sleeper $sleeper = null, Swift_Plugins_Timer $timer = null) |
|
80 | + { |
|
81 | + $this->rate = $rate; |
|
82 | + $this->mode = $mode; |
|
83 | + $this->sleeper = $sleeper; |
|
84 | + $this->timer = $timer; |
|
85 | + } |
|
86 | + |
|
87 | + /** |
|
88 | + * Invoked immediately before the Message is sent. |
|
89 | + */ |
|
90 | + public function beforeSendPerformed(Swift_Events_SendEvent $evt) |
|
91 | + { |
|
92 | + $time = $this->getTimestamp(); |
|
93 | + if (!isset($this->start)) { |
|
94 | + $this->start = $time; |
|
95 | + } |
|
96 | + $duration = $time - $this->start; |
|
97 | + |
|
98 | + switch ($this->mode) { |
|
99 | + case self::BYTES_PER_MINUTE: |
|
100 | + $sleep = $this->throttleBytesPerMinute($duration); |
|
101 | + break; |
|
102 | + case self::MESSAGES_PER_SECOND: |
|
103 | + $sleep = $this->throttleMessagesPerSecond($duration); |
|
104 | + break; |
|
105 | + case self::MESSAGES_PER_MINUTE: |
|
106 | + $sleep = $this->throttleMessagesPerMinute($duration); |
|
107 | + break; |
|
108 | + default: |
|
109 | + $sleep = 0; |
|
110 | + break; |
|
111 | + } |
|
112 | + |
|
113 | + if ($sleep > 0) { |
|
114 | + $this->sleep($sleep); |
|
115 | + } |
|
116 | + } |
|
117 | + |
|
118 | + /** |
|
119 | + * Invoked when a Message is sent. |
|
120 | + */ |
|
121 | + public function sendPerformed(Swift_Events_SendEvent $evt) |
|
122 | + { |
|
123 | + parent::sendPerformed($evt); |
|
124 | + ++$this->messages; |
|
125 | + } |
|
126 | + |
|
127 | + /** |
|
128 | + * Sleep for $seconds. |
|
129 | + * |
|
130 | + * @param int $seconds |
|
131 | + */ |
|
132 | + public function sleep($seconds) |
|
133 | + { |
|
134 | + if (isset($this->sleeper)) { |
|
135 | + $this->sleeper->sleep($seconds); |
|
136 | + } else { |
|
137 | + sleep($seconds); |
|
138 | + } |
|
139 | + } |
|
140 | + |
|
141 | + /** |
|
142 | + * Get the current UNIX timestamp. |
|
143 | + * |
|
144 | + * @return int |
|
145 | + */ |
|
146 | + public function getTimestamp() |
|
147 | + { |
|
148 | + if (isset($this->timer)) { |
|
149 | + return $this->timer->getTimestamp(); |
|
150 | + } |
|
151 | + |
|
152 | + return time(); |
|
153 | + } |
|
154 | + |
|
155 | + /** |
|
156 | + * Get a number of seconds to sleep for. |
|
157 | + * |
|
158 | + * @param int $timePassed |
|
159 | + * |
|
160 | + * @return int |
|
161 | + */ |
|
162 | + private function throttleBytesPerMinute($timePassed) |
|
163 | + { |
|
164 | + $expectedDuration = $this->getBytesOut() / ($this->rate / 60); |
|
165 | + |
|
166 | + return (int) ceil($expectedDuration - $timePassed); |
|
167 | + } |
|
168 | + |
|
169 | + /** |
|
170 | + * Get a number of seconds to sleep for. |
|
171 | + * |
|
172 | + * @param int $timePassed |
|
173 | + * |
|
174 | + * @return int |
|
175 | + */ |
|
176 | + private function throttleMessagesPerSecond($timePassed) |
|
177 | + { |
|
178 | + $expectedDuration = $this->messages / $this->rate; |
|
179 | + |
|
180 | + return (int) ceil($expectedDuration - $timePassed); |
|
181 | + } |
|
182 | + |
|
183 | + /** |
|
184 | + * Get a number of seconds to sleep for. |
|
185 | + * |
|
186 | + * @param int $timePassed |
|
187 | + * |
|
188 | + * @return int |
|
189 | + */ |
|
190 | + private function throttleMessagesPerMinute($timePassed) |
|
191 | + { |
|
192 | + $expectedDuration = $this->messages / ($this->rate / 60); |
|
193 | + |
|
194 | + return (int) ceil($expectedDuration - $timePassed); |
|
195 | + } |
|
196 | 196 | } |
@@ -15,51 +15,51 @@ |
||
15 | 15 | */ |
16 | 16 | class Swift_Plugins_ImpersonatePlugin implements Swift_Events_SendListener |
17 | 17 | { |
18 | - /** |
|
19 | - * The sender to impersonate. |
|
20 | - * |
|
21 | - * @var string |
|
22 | - */ |
|
23 | - private $sender; |
|
18 | + /** |
|
19 | + * The sender to impersonate. |
|
20 | + * |
|
21 | + * @var string |
|
22 | + */ |
|
23 | + private $sender; |
|
24 | 24 | |
25 | - /** |
|
26 | - * Create a new ImpersonatePlugin to impersonate $sender. |
|
27 | - * |
|
28 | - * @param string $sender address |
|
29 | - */ |
|
30 | - public function __construct($sender) |
|
31 | - { |
|
32 | - $this->sender = $sender; |
|
33 | - } |
|
25 | + /** |
|
26 | + * Create a new ImpersonatePlugin to impersonate $sender. |
|
27 | + * |
|
28 | + * @param string $sender address |
|
29 | + */ |
|
30 | + public function __construct($sender) |
|
31 | + { |
|
32 | + $this->sender = $sender; |
|
33 | + } |
|
34 | 34 | |
35 | - /** |
|
36 | - * Invoked immediately before the Message is sent. |
|
37 | - */ |
|
38 | - public function beforeSendPerformed(Swift_Events_SendEvent $evt) |
|
39 | - { |
|
40 | - $message = $evt->getMessage(); |
|
41 | - $headers = $message->getHeaders(); |
|
35 | + /** |
|
36 | + * Invoked immediately before the Message is sent. |
|
37 | + */ |
|
38 | + public function beforeSendPerformed(Swift_Events_SendEvent $evt) |
|
39 | + { |
|
40 | + $message = $evt->getMessage(); |
|
41 | + $headers = $message->getHeaders(); |
|
42 | 42 | |
43 | - // save current recipients |
|
44 | - $headers->addPathHeader('X-Swift-Return-Path', $message->getReturnPath()); |
|
43 | + // save current recipients |
|
44 | + $headers->addPathHeader('X-Swift-Return-Path', $message->getReturnPath()); |
|
45 | 45 | |
46 | - // replace them with the one to send to |
|
47 | - $message->setReturnPath($this->sender); |
|
48 | - } |
|
46 | + // replace them with the one to send to |
|
47 | + $message->setReturnPath($this->sender); |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * Invoked immediately after the Message is sent. |
|
52 | - */ |
|
53 | - public function sendPerformed(Swift_Events_SendEvent $evt) |
|
54 | - { |
|
55 | - $message = $evt->getMessage(); |
|
50 | + /** |
|
51 | + * Invoked immediately after the Message is sent. |
|
52 | + */ |
|
53 | + public function sendPerformed(Swift_Events_SendEvent $evt) |
|
54 | + { |
|
55 | + $message = $evt->getMessage(); |
|
56 | 56 | |
57 | - // restore original headers |
|
58 | - $headers = $message->getHeaders(); |
|
57 | + // restore original headers |
|
58 | + $headers = $message->getHeaders(); |
|
59 | 59 | |
60 | - if ($headers->has('X-Swift-Return-Path')) { |
|
61 | - $message->setReturnPath($headers->get('X-Swift-Return-Path')->getAddress()); |
|
62 | - $headers->removeAll('X-Swift-Return-Path'); |
|
63 | - } |
|
64 | - } |
|
60 | + if ($headers->has('X-Swift-Return-Path')) { |
|
61 | + $message->setReturnPath($headers->get('X-Swift-Return-Path')->getAddress()); |
|
62 | + $headers->removeAll('X-Swift-Return-Path'); |
|
63 | + } |
|
64 | + } |
|
65 | 65 | } |
@@ -15,17 +15,17 @@ |
||
15 | 15 | */ |
16 | 16 | interface Swift_Plugins_Decorator_Replacements |
17 | 17 | { |
18 | - /** |
|
19 | - * Return the array of replacements for $address. |
|
20 | - * |
|
21 | - * This method is invoked once for every single recipient of a message. |
|
22 | - * |
|
23 | - * If no replacements can be found, an empty value (NULL) should be returned |
|
24 | - * and no replacements will then be made on the message. |
|
25 | - * |
|
26 | - * @param string $address |
|
27 | - * |
|
28 | - * @return array |
|
29 | - */ |
|
30 | - public function getReplacementsFor($address); |
|
18 | + /** |
|
19 | + * Return the array of replacements for $address. |
|
20 | + * |
|
21 | + * This method is invoked once for every single recipient of a message. |
|
22 | + * |
|
23 | + * If no replacements can be found, an empty value (NULL) should be returned |
|
24 | + * and no replacements will then be made on the message. |
|
25 | + * |
|
26 | + * @param string $address |
|
27 | + * |
|
28 | + * @return array |
|
29 | + */ |
|
30 | + public function getReplacementsFor($address); |
|
31 | 31 | } |
@@ -15,58 +15,58 @@ |
||
15 | 15 | */ |
16 | 16 | class Swift_Plugins_Loggers_ArrayLogger implements Swift_Plugins_Logger |
17 | 17 | { |
18 | - /** |
|
19 | - * The log contents. |
|
20 | - * |
|
21 | - * @var array |
|
22 | - */ |
|
23 | - private $log = []; |
|
18 | + /** |
|
19 | + * The log contents. |
|
20 | + * |
|
21 | + * @var array |
|
22 | + */ |
|
23 | + private $log = []; |
|
24 | 24 | |
25 | - /** |
|
26 | - * Max size of the log. |
|
27 | - * |
|
28 | - * @var int |
|
29 | - */ |
|
30 | - private $size = 0; |
|
25 | + /** |
|
26 | + * Max size of the log. |
|
27 | + * |
|
28 | + * @var int |
|
29 | + */ |
|
30 | + private $size = 0; |
|
31 | 31 | |
32 | - /** |
|
33 | - * Create a new ArrayLogger with a maximum of $size entries. |
|
34 | - * |
|
35 | - * @var int |
|
36 | - */ |
|
37 | - public function __construct($size = 50) |
|
38 | - { |
|
39 | - $this->size = $size; |
|
40 | - } |
|
32 | + /** |
|
33 | + * Create a new ArrayLogger with a maximum of $size entries. |
|
34 | + * |
|
35 | + * @var int |
|
36 | + */ |
|
37 | + public function __construct($size = 50) |
|
38 | + { |
|
39 | + $this->size = $size; |
|
40 | + } |
|
41 | 41 | |
42 | - /** |
|
43 | - * Add a log entry. |
|
44 | - * |
|
45 | - * @param string $entry |
|
46 | - */ |
|
47 | - public function add($entry) |
|
48 | - { |
|
49 | - $this->log[] = $entry; |
|
50 | - while (\count($this->log) > $this->size) { |
|
51 | - array_shift($this->log); |
|
52 | - } |
|
53 | - } |
|
42 | + /** |
|
43 | + * Add a log entry. |
|
44 | + * |
|
45 | + * @param string $entry |
|
46 | + */ |
|
47 | + public function add($entry) |
|
48 | + { |
|
49 | + $this->log[] = $entry; |
|
50 | + while (\count($this->log) > $this->size) { |
|
51 | + array_shift($this->log); |
|
52 | + } |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * Clear the log contents. |
|
57 | - */ |
|
58 | - public function clear() |
|
59 | - { |
|
60 | - $this->log = []; |
|
61 | - } |
|
55 | + /** |
|
56 | + * Clear the log contents. |
|
57 | + */ |
|
58 | + public function clear() |
|
59 | + { |
|
60 | + $this->log = []; |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * Get this log as a string. |
|
65 | - * |
|
66 | - * @return string |
|
67 | - */ |
|
68 | - public function dump() |
|
69 | - { |
|
70 | - return implode(PHP_EOL, $this->log); |
|
71 | - } |
|
63 | + /** |
|
64 | + * Get this log as a string. |
|
65 | + * |
|
66 | + * @return string |
|
67 | + */ |
|
68 | + public function dump() |
|
69 | + { |
|
70 | + return implode(PHP_EOL, $this->log); |
|
71 | + } |
|
72 | 72 | } |
@@ -15,44 +15,44 @@ |
||
15 | 15 | */ |
16 | 16 | class Swift_Plugins_Loggers_EchoLogger implements Swift_Plugins_Logger |
17 | 17 | { |
18 | - /** Whether or not HTML should be output */ |
|
19 | - private $isHtml; |
|
18 | + /** Whether or not HTML should be output */ |
|
19 | + private $isHtml; |
|
20 | 20 | |
21 | - /** |
|
22 | - * Create a new EchoLogger. |
|
23 | - * |
|
24 | - * @param bool $isHtml |
|
25 | - */ |
|
26 | - public function __construct($isHtml = true) |
|
27 | - { |
|
28 | - $this->isHtml = $isHtml; |
|
29 | - } |
|
21 | + /** |
|
22 | + * Create a new EchoLogger. |
|
23 | + * |
|
24 | + * @param bool $isHtml |
|
25 | + */ |
|
26 | + public function __construct($isHtml = true) |
|
27 | + { |
|
28 | + $this->isHtml = $isHtml; |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * Add a log entry. |
|
33 | - * |
|
34 | - * @param string $entry |
|
35 | - */ |
|
36 | - public function add($entry) |
|
37 | - { |
|
38 | - if ($this->isHtml) { |
|
39 | - printf('%s%s%s', htmlspecialchars($entry, ENT_QUOTES), '<br />', PHP_EOL); |
|
40 | - } else { |
|
41 | - printf('%s%s', $entry, PHP_EOL); |
|
42 | - } |
|
43 | - } |
|
31 | + /** |
|
32 | + * Add a log entry. |
|
33 | + * |
|
34 | + * @param string $entry |
|
35 | + */ |
|
36 | + public function add($entry) |
|
37 | + { |
|
38 | + if ($this->isHtml) { |
|
39 | + printf('%s%s%s', htmlspecialchars($entry, ENT_QUOTES), '<br />', PHP_EOL); |
|
40 | + } else { |
|
41 | + printf('%s%s', $entry, PHP_EOL); |
|
42 | + } |
|
43 | + } |
|
44 | 44 | |
45 | - /** |
|
46 | - * Not implemented. |
|
47 | - */ |
|
48 | - public function clear() |
|
49 | - { |
|
50 | - } |
|
45 | + /** |
|
46 | + * Not implemented. |
|
47 | + */ |
|
48 | + public function clear() |
|
49 | + { |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * Not implemented. |
|
54 | - */ |
|
55 | - public function dump() |
|
56 | - { |
|
57 | - } |
|
52 | + /** |
|
53 | + * Not implemented. |
|
54 | + */ |
|
55 | + public function dump() |
|
56 | + { |
|
57 | + } |
|
58 | 58 | } |
@@ -15,22 +15,22 @@ |
||
15 | 15 | */ |
16 | 16 | interface Swift_Plugins_Logger |
17 | 17 | { |
18 | - /** |
|
19 | - * Add a log entry. |
|
20 | - * |
|
21 | - * @param string $entry |
|
22 | - */ |
|
23 | - public function add($entry); |
|
18 | + /** |
|
19 | + * Add a log entry. |
|
20 | + * |
|
21 | + * @param string $entry |
|
22 | + */ |
|
23 | + public function add($entry); |
|
24 | 24 | |
25 | - /** |
|
26 | - * Clear the log contents. |
|
27 | - */ |
|
28 | - public function clear(); |
|
25 | + /** |
|
26 | + * Clear the log contents. |
|
27 | + */ |
|
28 | + public function clear(); |
|
29 | 29 | |
30 | - /** |
|
31 | - * Get this log as a string. |
|
32 | - * |
|
33 | - * @return string |
|
34 | - */ |
|
35 | - public function dump(); |
|
30 | + /** |
|
31 | + * Get this log as a string. |
|
32 | + * |
|
33 | + * @return string |
|
34 | + */ |
|
35 | + public function dump(); |
|
36 | 36 | } |
@@ -15,10 +15,10 @@ |
||
15 | 15 | */ |
16 | 16 | interface Swift_Plugins_Timer |
17 | 17 | { |
18 | - /** |
|
19 | - * Get the current UNIX timestamp. |
|
20 | - * |
|
21 | - * @return int |
|
22 | - */ |
|
23 | - public function getTimestamp(); |
|
18 | + /** |
|
19 | + * Get the current UNIX timestamp. |
|
20 | + * |
|
21 | + * @return int |
|
22 | + */ |
|
23 | + public function getTimestamp(); |
|
24 | 24 | } |
@@ -15,13 +15,13 @@ |
||
15 | 15 | */ |
16 | 16 | class Swift_Plugins_Pop_Pop3Exception extends Swift_IoException |
17 | 17 | { |
18 | - /** |
|
19 | - * Create a new Pop3Exception with $message. |
|
20 | - * |
|
21 | - * @param string $message |
|
22 | - */ |
|
23 | - public function __construct($message) |
|
24 | - { |
|
25 | - parent::__construct($message); |
|
26 | - } |
|
18 | + /** |
|
19 | + * Create a new Pop3Exception with $message. |
|
20 | + * |
|
21 | + * @param string $message |
|
22 | + */ |
|
23 | + public function __construct($message) |
|
24 | + { |
|
25 | + parent::__construct($message); |
|
26 | + } |
|
27 | 27 | } |
@@ -15,17 +15,17 @@ |
||
15 | 15 | */ |
16 | 16 | interface Swift_Plugins_Pop_Pop3Connection |
17 | 17 | { |
18 | - /** |
|
19 | - * Connect to the POP3 host and throw an Exception if it fails. |
|
20 | - * |
|
21 | - * @throws Swift_Plugins_Pop_Pop3Exception |
|
22 | - */ |
|
23 | - public function connect(); |
|
18 | + /** |
|
19 | + * Connect to the POP3 host and throw an Exception if it fails. |
|
20 | + * |
|
21 | + * @throws Swift_Plugins_Pop_Pop3Exception |
|
22 | + */ |
|
23 | + public function connect(); |
|
24 | 24 | |
25 | - /** |
|
26 | - * Disconnect from the POP3 host and throw an Exception if it fails. |
|
27 | - * |
|
28 | - * @throws Swift_Plugins_Pop_Pop3Exception |
|
29 | - */ |
|
30 | - public function disconnect(); |
|
25 | + /** |
|
26 | + * Disconnect from the POP3 host and throw an Exception if it fails. |
|
27 | + * |
|
28 | + * @throws Swift_Plugins_Pop_Pop3Exception |
|
29 | + */ |
|
30 | + public function disconnect(); |
|
31 | 31 | } |