1 | <?php |
||
11 | class Mailer extends BaseMailer |
||
12 | { |
||
13 | /** |
||
14 | * The Swift Mailer Manager instance. |
||
15 | * |
||
16 | * @var \ElfSundae\Multimail\SwiftMailerManager |
||
17 | */ |
||
18 | protected $swiftManager; |
||
19 | |||
20 | /** |
||
21 | * The registered mail driver handler. |
||
22 | * |
||
23 | * @var \Closure|string |
||
24 | */ |
||
25 | protected $mailDriverHandler; |
||
26 | |||
27 | /** |
||
28 | * Get the Swift Mailer Manager instance. |
||
29 | * |
||
30 | * @return \ElfSundae\Multimail\SwiftMailerManager |
||
31 | */ |
||
32 | 5 | public function getSwiftMailerManager() |
|
36 | |||
37 | /** |
||
38 | * Set the Swift Mailer Manager instance. |
||
39 | * |
||
40 | * @param \ElfSundae\Multimail\SwiftMailerManager $manager |
||
41 | * @return $this |
||
42 | */ |
||
43 | 7 | public function setSwiftMailerManager(SwiftMailerManager $manager) |
|
49 | |||
50 | /** |
||
51 | * Register the mail driver handler. |
||
52 | * |
||
53 | * @param \Closure|string $handler |
||
54 | * @return $this |
||
55 | */ |
||
56 | 2 | public function registerMailDriverHandler($handler) |
|
62 | |||
63 | /** |
||
64 | * Call the registered mail driver handler. |
||
65 | * |
||
66 | * @param mixed ...$args |
||
67 | * @return mixed |
||
68 | */ |
||
69 | 3 | protected function callMailDriverHandler(...$args) |
|
79 | |||
80 | /** |
||
81 | * Get a Swift Mailer instance for the given message. |
||
82 | * |
||
83 | * @param mixed $message |
||
84 | * @return \Swift_Mailer |
||
85 | */ |
||
86 | 3 | protected function getSwiftMailerForMessage($message) |
|
96 | |||
97 | /** |
||
98 | * Send a new message using a view. |
||
99 | * |
||
100 | * @param string|array $view |
||
101 | * @param array $data |
||
102 | * @param \Closure|string $callback |
||
103 | * @return void |
||
104 | */ |
||
105 | 3 | public function send($view, array $data = [], $callback = null) |
|
135 | |||
136 | /** |
||
137 | * Send a Swift Message instance. |
||
138 | * |
||
139 | * @param \Swift_Message $message |
||
140 | * @param \Swift_Mailer $swift |
||
141 | * @return void |
||
142 | */ |
||
143 | 3 | protected function sendSwiftMessage($message, Swift_Mailer $swift = null) |
|
159 | |||
160 | /** |
||
161 | * Force the transport to re-connect. |
||
162 | * |
||
163 | * This will prevent errors in daemon queue situations. |
||
164 | * |
||
165 | * @param \Swift_Mailer $swiftMailer |
||
166 | * @return void |
||
167 | */ |
||
168 | 3 | protected function forceReconnection($swiftMailer = null) |
|
176 | |||
177 | /** |
||
178 | * Get the Swift Mailer instance. |
||
179 | * |
||
180 | * @return \Swift_Mailer |
||
181 | */ |
||
182 | 1 | public function getSwiftMailer() |
|
186 | |||
187 | /** |
||
188 | * Set the Swift Mailer instance. |
||
189 | * |
||
190 | * @param \Swift_Mailer $swift |
||
191 | * @return void |
||
192 | */ |
||
193 | 2 | public function setSwiftMailer($swift) |
|
200 | } |
||
201 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.