Conditions | 3 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function extendTransportManager(TransportManager $manager) |
||
26 | { |
||
27 | $manager->extend('sendgrid', function() { |
||
28 | $config = $this->app['config']->get('services.sendgrid', array()); |
||
29 | $client = new HttpClient(Arr::get($config, 'guzzle', [])); |
||
30 | |||
31 | if (Arr::get($config, 'version') === 'v3') { |
||
32 | $pretend = isset($config['pretend']) ? $config['pretend'] : false; |
||
33 | return new SendgridV3Transport($client, $config['api_key'], $pretend); |
||
34 | } |
||
35 | |||
36 | return new SendgridTransport($client, $config['api_key']); |
||
37 | }); |
||
38 | } |
||
39 | } |
||
40 |