@@ -15,8 +15,8 @@ |
||
15 | 15 | */ |
16 | 16 | interface Swift_Events_TransportExceptionListener extends Swift_Events_EventListener |
17 | 17 | { |
18 | - /** |
|
19 | - * Invoked as a TransportException is thrown in the Transport system. |
|
20 | - */ |
|
21 | - public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt); |
|
18 | + /** |
|
19 | + * Invoked as a TransportException is thrown in the Transport system. |
|
20 | + */ |
|
21 | + public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt); |
|
22 | 22 | } |
@@ -15,24 +15,24 @@ |
||
15 | 15 | */ |
16 | 16 | interface Swift_Events_Event |
17 | 17 | { |
18 | - /** |
|
19 | - * Get the source object of this event. |
|
20 | - * |
|
21 | - * @return object |
|
22 | - */ |
|
23 | - public function getSource(); |
|
18 | + /** |
|
19 | + * Get the source object of this event. |
|
20 | + * |
|
21 | + * @return object |
|
22 | + */ |
|
23 | + public function getSource(); |
|
24 | 24 | |
25 | - /** |
|
26 | - * Prevent this Event from bubbling any further up the stack. |
|
27 | - * |
|
28 | - * @param bool $cancel, optional |
|
29 | - */ |
|
30 | - public function cancelBubble($cancel = true); |
|
25 | + /** |
|
26 | + * Prevent this Event from bubbling any further up the stack. |
|
27 | + * |
|
28 | + * @param bool $cancel, optional |
|
29 | + */ |
|
30 | + public function cancelBubble($cancel = true); |
|
31 | 31 | |
32 | - /** |
|
33 | - * Returns true if this Event will not bubble any further up the stack. |
|
34 | - * |
|
35 | - * @return bool |
|
36 | - */ |
|
37 | - public function bubbleCancelled(); |
|
32 | + /** |
|
33 | + * Returns true if this Event will not bubble any further up the stack. |
|
34 | + * |
|
35 | + * @return bool |
|
36 | + */ |
|
37 | + public function bubbleCancelled(); |
|
38 | 38 | } |
@@ -15,13 +15,13 @@ |
||
15 | 15 | */ |
16 | 16 | interface Swift_Events_SendListener extends Swift_Events_EventListener |
17 | 17 | { |
18 | - /** |
|
19 | - * Invoked immediately before the Message is sent. |
|
20 | - */ |
|
21 | - public function beforeSendPerformed(Swift_Events_SendEvent $evt); |
|
18 | + /** |
|
19 | + * Invoked immediately before the Message is sent. |
|
20 | + */ |
|
21 | + public function beforeSendPerformed(Swift_Events_SendEvent $evt); |
|
22 | 22 | |
23 | - /** |
|
24 | - * Invoked immediately after the Message is sent. |
|
25 | - */ |
|
26 | - public function sendPerformed(Swift_Events_SendEvent $evt); |
|
23 | + /** |
|
24 | + * Invoked immediately after the Message is sent. |
|
25 | + */ |
|
26 | + public function sendPerformed(Swift_Events_SendEvent $evt); |
|
27 | 27 | } |
@@ -15,8 +15,8 @@ |
||
15 | 15 | */ |
16 | 16 | interface Swift_Events_ResponseListener extends Swift_Events_EventListener |
17 | 17 | { |
18 | - /** |
|
19 | - * Invoked immediately following a response coming back. |
|
20 | - */ |
|
21 | - public function responseReceived(Swift_Events_ResponseEvent $evt); |
|
18 | + /** |
|
19 | + * Invoked immediately following a response coming back. |
|
20 | + */ |
|
21 | + public function responseReceived(Swift_Events_ResponseEvent $evt); |
|
22 | 22 | } |
@@ -15,8 +15,8 @@ |
||
15 | 15 | */ |
16 | 16 | interface Swift_Events_CommandListener extends Swift_Events_EventListener |
17 | 17 | { |
18 | - /** |
|
19 | - * Invoked immediately following a command being sent. |
|
20 | - */ |
|
21 | - public function commandSent(Swift_Events_CommandEvent $evt); |
|
18 | + /** |
|
19 | + * Invoked immediately following a command being sent. |
|
20 | + */ |
|
21 | + public function commandSent(Swift_Events_CommandEvent $evt); |
|
22 | 22 | } |
@@ -15,50 +15,50 @@ |
||
15 | 15 | */ |
16 | 16 | class Swift_Events_ResponseEvent extends Swift_Events_EventObject |
17 | 17 | { |
18 | - /** |
|
19 | - * The overall result. |
|
20 | - * |
|
21 | - * @var bool |
|
22 | - */ |
|
23 | - private $valid; |
|
18 | + /** |
|
19 | + * The overall result. |
|
20 | + * |
|
21 | + * @var bool |
|
22 | + */ |
|
23 | + private $valid; |
|
24 | 24 | |
25 | - /** |
|
26 | - * The response received from the server. |
|
27 | - * |
|
28 | - * @var string |
|
29 | - */ |
|
30 | - private $response; |
|
25 | + /** |
|
26 | + * The response received from the server. |
|
27 | + * |
|
28 | + * @var string |
|
29 | + */ |
|
30 | + private $response; |
|
31 | 31 | |
32 | - /** |
|
33 | - * Create a new ResponseEvent for $source and $response. |
|
34 | - * |
|
35 | - * @param string $response |
|
36 | - * @param bool $valid |
|
37 | - */ |
|
38 | - public function __construct(Swift_Transport $source, $response, $valid = false) |
|
39 | - { |
|
40 | - parent::__construct($source); |
|
41 | - $this->response = $response; |
|
42 | - $this->valid = $valid; |
|
43 | - } |
|
32 | + /** |
|
33 | + * Create a new ResponseEvent for $source and $response. |
|
34 | + * |
|
35 | + * @param string $response |
|
36 | + * @param bool $valid |
|
37 | + */ |
|
38 | + public function __construct(Swift_Transport $source, $response, $valid = false) |
|
39 | + { |
|
40 | + parent::__construct($source); |
|
41 | + $this->response = $response; |
|
42 | + $this->valid = $valid; |
|
43 | + } |
|
44 | 44 | |
45 | - /** |
|
46 | - * Get the response which was received from the server. |
|
47 | - * |
|
48 | - * @return string |
|
49 | - */ |
|
50 | - public function getResponse() |
|
51 | - { |
|
52 | - return $this->response; |
|
53 | - } |
|
45 | + /** |
|
46 | + * Get the response which was received from the server. |
|
47 | + * |
|
48 | + * @return string |
|
49 | + */ |
|
50 | + public function getResponse() |
|
51 | + { |
|
52 | + return $this->response; |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * Get the success status of this Event. |
|
57 | - * |
|
58 | - * @return bool |
|
59 | - */ |
|
60 | - public function isValid() |
|
61 | - { |
|
62 | - return $this->valid; |
|
63 | - } |
|
55 | + /** |
|
56 | + * Get the success status of this Event. |
|
57 | + * |
|
58 | + * @return bool |
|
59 | + */ |
|
60 | + public function isValid() |
|
61 | + { |
|
62 | + return $this->valid; |
|
63 | + } |
|
64 | 64 | } |
@@ -15,56 +15,56 @@ |
||
15 | 15 | */ |
16 | 16 | interface Swift_Events_EventDispatcher |
17 | 17 | { |
18 | - /** |
|
19 | - * Create a new SendEvent for $source and $message. |
|
20 | - * |
|
21 | - * @return Swift_Events_SendEvent |
|
22 | - */ |
|
23 | - public function createSendEvent(Swift_Transport $source, Swift_Mime_SimpleMessage $message); |
|
18 | + /** |
|
19 | + * Create a new SendEvent for $source and $message. |
|
20 | + * |
|
21 | + * @return Swift_Events_SendEvent |
|
22 | + */ |
|
23 | + public function createSendEvent(Swift_Transport $source, Swift_Mime_SimpleMessage $message); |
|
24 | 24 | |
25 | - /** |
|
26 | - * Create a new CommandEvent for $source and $command. |
|
27 | - * |
|
28 | - * @param string $command That will be executed |
|
29 | - * @param array $successCodes That are needed |
|
30 | - * |
|
31 | - * @return Swift_Events_CommandEvent |
|
32 | - */ |
|
33 | - public function createCommandEvent(Swift_Transport $source, $command, $successCodes = []); |
|
25 | + /** |
|
26 | + * Create a new CommandEvent for $source and $command. |
|
27 | + * |
|
28 | + * @param string $command That will be executed |
|
29 | + * @param array $successCodes That are needed |
|
30 | + * |
|
31 | + * @return Swift_Events_CommandEvent |
|
32 | + */ |
|
33 | + public function createCommandEvent(Swift_Transport $source, $command, $successCodes = []); |
|
34 | 34 | |
35 | - /** |
|
36 | - * Create a new ResponseEvent for $source and $response. |
|
37 | - * |
|
38 | - * @param string $response |
|
39 | - * @param bool $valid If the response is valid |
|
40 | - * |
|
41 | - * @return Swift_Events_ResponseEvent |
|
42 | - */ |
|
43 | - public function createResponseEvent(Swift_Transport $source, $response, $valid); |
|
35 | + /** |
|
36 | + * Create a new ResponseEvent for $source and $response. |
|
37 | + * |
|
38 | + * @param string $response |
|
39 | + * @param bool $valid If the response is valid |
|
40 | + * |
|
41 | + * @return Swift_Events_ResponseEvent |
|
42 | + */ |
|
43 | + public function createResponseEvent(Swift_Transport $source, $response, $valid); |
|
44 | 44 | |
45 | - /** |
|
46 | - * Create a new TransportChangeEvent for $source. |
|
47 | - * |
|
48 | - * @return Swift_Events_TransportChangeEvent |
|
49 | - */ |
|
50 | - public function createTransportChangeEvent(Swift_Transport $source); |
|
45 | + /** |
|
46 | + * Create a new TransportChangeEvent for $source. |
|
47 | + * |
|
48 | + * @return Swift_Events_TransportChangeEvent |
|
49 | + */ |
|
50 | + public function createTransportChangeEvent(Swift_Transport $source); |
|
51 | 51 | |
52 | - /** |
|
53 | - * Create a new TransportExceptionEvent for $source. |
|
54 | - * |
|
55 | - * @return Swift_Events_TransportExceptionEvent |
|
56 | - */ |
|
57 | - public function createTransportExceptionEvent(Swift_Transport $source, Swift_TransportException $ex); |
|
52 | + /** |
|
53 | + * Create a new TransportExceptionEvent for $source. |
|
54 | + * |
|
55 | + * @return Swift_Events_TransportExceptionEvent |
|
56 | + */ |
|
57 | + public function createTransportExceptionEvent(Swift_Transport $source, Swift_TransportException $ex); |
|
58 | 58 | |
59 | - /** |
|
60 | - * Bind an event listener to this dispatcher. |
|
61 | - */ |
|
62 | - public function bindEventListener(Swift_Events_EventListener $listener); |
|
59 | + /** |
|
60 | + * Bind an event listener to this dispatcher. |
|
61 | + */ |
|
62 | + public function bindEventListener(Swift_Events_EventListener $listener); |
|
63 | 63 | |
64 | - /** |
|
65 | - * Dispatch the given Event to all suitable listeners. |
|
66 | - * |
|
67 | - * @param string $target method |
|
68 | - */ |
|
69 | - public function dispatchEvent(Swift_Events_EventObject $evt, $target); |
|
64 | + /** |
|
65 | + * Dispatch the given Event to all suitable listeners. |
|
66 | + * |
|
67 | + * @param string $target method |
|
68 | + */ |
|
69 | + public function dispatchEvent(Swift_Events_EventObject $evt, $target); |
|
70 | 70 | } |
@@ -15,29 +15,29 @@ |
||
15 | 15 | */ |
16 | 16 | class Swift_Events_TransportExceptionEvent extends Swift_Events_EventObject |
17 | 17 | { |
18 | - /** |
|
19 | - * The Exception thrown. |
|
20 | - * |
|
21 | - * @var Swift_TransportException |
|
22 | - */ |
|
23 | - private $exception; |
|
18 | + /** |
|
19 | + * The Exception thrown. |
|
20 | + * |
|
21 | + * @var Swift_TransportException |
|
22 | + */ |
|
23 | + private $exception; |
|
24 | 24 | |
25 | - /** |
|
26 | - * Create a new TransportExceptionEvent for $transport. |
|
27 | - */ |
|
28 | - public function __construct(Swift_Transport $transport, Swift_TransportException $ex) |
|
29 | - { |
|
30 | - parent::__construct($transport); |
|
31 | - $this->exception = $ex; |
|
32 | - } |
|
25 | + /** |
|
26 | + * Create a new TransportExceptionEvent for $transport. |
|
27 | + */ |
|
28 | + public function __construct(Swift_Transport $transport, Swift_TransportException $ex) |
|
29 | + { |
|
30 | + parent::__construct($transport); |
|
31 | + $this->exception = $ex; |
|
32 | + } |
|
33 | 33 | |
34 | - /** |
|
35 | - * Get the TransportException thrown. |
|
36 | - * |
|
37 | - * @return Swift_TransportException |
|
38 | - */ |
|
39 | - public function getException() |
|
40 | - { |
|
41 | - return $this->exception; |
|
42 | - } |
|
34 | + /** |
|
35 | + * Get the TransportException thrown. |
|
36 | + * |
|
37 | + * @return Swift_TransportException |
|
38 | + */ |
|
39 | + public function getException() |
|
40 | + { |
|
41 | + return $this->exception; |
|
42 | + } |
|
43 | 43 | } |
@@ -15,112 +15,112 @@ |
||
15 | 15 | */ |
16 | 16 | class Swift_Events_SendEvent extends Swift_Events_EventObject |
17 | 17 | { |
18 | - /** Sending has yet to occur */ |
|
19 | - const RESULT_PENDING = 0x0001; |
|
20 | - |
|
21 | - /** Email is spooled, ready to be sent */ |
|
22 | - const RESULT_SPOOLED = 0x0011; |
|
23 | - |
|
24 | - /** Sending was successful */ |
|
25 | - const RESULT_SUCCESS = 0x0010; |
|
26 | - |
|
27 | - /** Sending worked, but there were some failures */ |
|
28 | - const RESULT_TENTATIVE = 0x0100; |
|
29 | - |
|
30 | - /** Sending failed */ |
|
31 | - const RESULT_FAILED = 0x1000; |
|
32 | - |
|
33 | - /** |
|
34 | - * The Message being sent. |
|
35 | - * |
|
36 | - * @var Swift_Mime_SimpleMessage |
|
37 | - */ |
|
38 | - private $message; |
|
39 | - |
|
40 | - /** |
|
41 | - * Any recipients which failed after sending. |
|
42 | - * |
|
43 | - * @var string[] |
|
44 | - */ |
|
45 | - private $failedRecipients = []; |
|
46 | - |
|
47 | - /** |
|
48 | - * The overall result as a bitmask from the class constants. |
|
49 | - * |
|
50 | - * @var int |
|
51 | - */ |
|
52 | - private $result; |
|
53 | - |
|
54 | - /** |
|
55 | - * Create a new SendEvent for $source and $message. |
|
56 | - */ |
|
57 | - public function __construct(Swift_Transport $source, Swift_Mime_SimpleMessage $message) |
|
58 | - { |
|
59 | - parent::__construct($source); |
|
60 | - $this->message = $message; |
|
61 | - $this->result = self::RESULT_PENDING; |
|
62 | - } |
|
63 | - |
|
64 | - /** |
|
65 | - * Get the Transport used to send the Message. |
|
66 | - * |
|
67 | - * @return Swift_Transport |
|
68 | - */ |
|
69 | - public function getTransport() |
|
70 | - { |
|
71 | - return $this->getSource(); |
|
72 | - } |
|
73 | - |
|
74 | - /** |
|
75 | - * Get the Message being sent. |
|
76 | - * |
|
77 | - * @return Swift_Mime_SimpleMessage |
|
78 | - */ |
|
79 | - public function getMessage() |
|
80 | - { |
|
81 | - return $this->message; |
|
82 | - } |
|
83 | - |
|
84 | - /** |
|
85 | - * Set the array of addresses that failed in sending. |
|
86 | - * |
|
87 | - * @param array $recipients |
|
88 | - */ |
|
89 | - public function setFailedRecipients($recipients) |
|
90 | - { |
|
91 | - $this->failedRecipients = $recipients; |
|
92 | - } |
|
93 | - |
|
94 | - /** |
|
95 | - * Get an recipient addresses which were not accepted for delivery. |
|
96 | - * |
|
97 | - * @return string[] |
|
98 | - */ |
|
99 | - public function getFailedRecipients() |
|
100 | - { |
|
101 | - return $this->failedRecipients; |
|
102 | - } |
|
103 | - |
|
104 | - /** |
|
105 | - * Set the result of sending. |
|
106 | - * |
|
107 | - * @param int $result |
|
108 | - */ |
|
109 | - public function setResult($result) |
|
110 | - { |
|
111 | - $this->result = $result; |
|
112 | - } |
|
113 | - |
|
114 | - /** |
|
115 | - * Get the result of this Event. |
|
116 | - * |
|
117 | - * The return value is a bitmask from |
|
118 | - * {@see RESULT_PENDING, RESULT_SUCCESS, RESULT_TENTATIVE, RESULT_FAILED} |
|
119 | - * |
|
120 | - * @return int |
|
121 | - */ |
|
122 | - public function getResult() |
|
123 | - { |
|
124 | - return $this->result; |
|
125 | - } |
|
18 | + /** Sending has yet to occur */ |
|
19 | + const RESULT_PENDING = 0x0001; |
|
20 | + |
|
21 | + /** Email is spooled, ready to be sent */ |
|
22 | + const RESULT_SPOOLED = 0x0011; |
|
23 | + |
|
24 | + /** Sending was successful */ |
|
25 | + const RESULT_SUCCESS = 0x0010; |
|
26 | + |
|
27 | + /** Sending worked, but there were some failures */ |
|
28 | + const RESULT_TENTATIVE = 0x0100; |
|
29 | + |
|
30 | + /** Sending failed */ |
|
31 | + const RESULT_FAILED = 0x1000; |
|
32 | + |
|
33 | + /** |
|
34 | + * The Message being sent. |
|
35 | + * |
|
36 | + * @var Swift_Mime_SimpleMessage |
|
37 | + */ |
|
38 | + private $message; |
|
39 | + |
|
40 | + /** |
|
41 | + * Any recipients which failed after sending. |
|
42 | + * |
|
43 | + * @var string[] |
|
44 | + */ |
|
45 | + private $failedRecipients = []; |
|
46 | + |
|
47 | + /** |
|
48 | + * The overall result as a bitmask from the class constants. |
|
49 | + * |
|
50 | + * @var int |
|
51 | + */ |
|
52 | + private $result; |
|
53 | + |
|
54 | + /** |
|
55 | + * Create a new SendEvent for $source and $message. |
|
56 | + */ |
|
57 | + public function __construct(Swift_Transport $source, Swift_Mime_SimpleMessage $message) |
|
58 | + { |
|
59 | + parent::__construct($source); |
|
60 | + $this->message = $message; |
|
61 | + $this->result = self::RESULT_PENDING; |
|
62 | + } |
|
63 | + |
|
64 | + /** |
|
65 | + * Get the Transport used to send the Message. |
|
66 | + * |
|
67 | + * @return Swift_Transport |
|
68 | + */ |
|
69 | + public function getTransport() |
|
70 | + { |
|
71 | + return $this->getSource(); |
|
72 | + } |
|
73 | + |
|
74 | + /** |
|
75 | + * Get the Message being sent. |
|
76 | + * |
|
77 | + * @return Swift_Mime_SimpleMessage |
|
78 | + */ |
|
79 | + public function getMessage() |
|
80 | + { |
|
81 | + return $this->message; |
|
82 | + } |
|
83 | + |
|
84 | + /** |
|
85 | + * Set the array of addresses that failed in sending. |
|
86 | + * |
|
87 | + * @param array $recipients |
|
88 | + */ |
|
89 | + public function setFailedRecipients($recipients) |
|
90 | + { |
|
91 | + $this->failedRecipients = $recipients; |
|
92 | + } |
|
93 | + |
|
94 | + /** |
|
95 | + * Get an recipient addresses which were not accepted for delivery. |
|
96 | + * |
|
97 | + * @return string[] |
|
98 | + */ |
|
99 | + public function getFailedRecipients() |
|
100 | + { |
|
101 | + return $this->failedRecipients; |
|
102 | + } |
|
103 | + |
|
104 | + /** |
|
105 | + * Set the result of sending. |
|
106 | + * |
|
107 | + * @param int $result |
|
108 | + */ |
|
109 | + public function setResult($result) |
|
110 | + { |
|
111 | + $this->result = $result; |
|
112 | + } |
|
113 | + |
|
114 | + /** |
|
115 | + * Get the result of this Event. |
|
116 | + * |
|
117 | + * The return value is a bitmask from |
|
118 | + * {@see RESULT_PENDING, RESULT_SUCCESS, RESULT_TENTATIVE, RESULT_FAILED} |
|
119 | + * |
|
120 | + * @return int |
|
121 | + */ |
|
122 | + public function getResult() |
|
123 | + { |
|
124 | + return $this->result; |
|
125 | + } |
|
126 | 126 | } |