Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 399 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 399 Revision 621
Zeile 1... Zeile 1...
1
<?php
1
<?php
Zeile 2... Zeile 2...
2
 
2
 
Zeile 3... Zeile 3...
3
namespace Illuminate\Mail;
3
namespace Illuminate\Mail;
-
 
4
 
4
 
5
use Aws\Ses\SesClient;
5
use Aws\Ses\SesClient;
6
use Aws\SesV2\SesV2Client;
6
use Closure;
7
use Closure;
7
use Illuminate\Contracts\Mail\Factory as FactoryContract;
8
use Illuminate\Contracts\Mail\Factory as FactoryContract;
8
use Illuminate\Log\LogManager;
9
use Illuminate\Log\LogManager;
9
use Illuminate\Mail\Transport\ArrayTransport;
10
use Illuminate\Mail\Transport\ArrayTransport;
-
 
11
use Illuminate\Mail\Transport\LogTransport;
10
use Illuminate\Mail\Transport\LogTransport;
12
use Illuminate\Mail\Transport\SesTransport;
11
use Illuminate\Mail\Transport\SesTransport;
13
use Illuminate\Mail\Transport\SesV2Transport;
12
use Illuminate\Support\Arr;
14
use Illuminate\Support\Arr;
13
use Illuminate\Support\Str;
15
use Illuminate\Support\Str;
14
use InvalidArgumentException;
16
use InvalidArgumentException;
Zeile 152... Zeile 154...
152
 
154
 
153
        if (isset($this->customCreators[$transport])) {
155
        if (isset($this->customCreators[$transport])) {
154
            return call_user_func($this->customCreators[$transport], $config);
156
            return call_user_func($this->customCreators[$transport], $config);
Zeile -... Zeile 157...
-
 
157
        }
155
        }
158
 
156
 
159
        if (trim($transport ?? '') === '' ||
157
        if (trim($transport ?? '') === '' || ! method_exists($this, $method = 'create'.ucfirst($transport).'Transport')) {
160
            ! method_exists($this, $method = 'create'.ucfirst(Str::camel($transport)).'Transport')) {
Zeile 158... Zeile 161...
158
            throw new InvalidArgumentException("Unsupported mail transport [{$transport}].");
161
            throw new InvalidArgumentException("Unsupported mail transport [{$transport}].");
159
        }
162
        }
Zeile 249... Zeile 252...
249
            $config['options'] ?? []
252
            $config['options'] ?? []
250
        );
253
        );
251
    }
254
    }
Zeile 252... Zeile 255...
252
 
255
 
-
 
256
    /**
-
 
257
     * Create an instance of the Symfony Amazon SES V2 Transport driver.
-
 
258
     *
-
 
259
     * @param  array  $config
-
 
260
     * @return \Illuminate\Mail\Transport\Se2VwTransport
-
 
261
     */
-
 
262
    protected function createSesV2Transport(array $config)
-
 
263
    {
-
 
264
        $config = array_merge(
-
 
265
            $this->app['config']->get('services.ses', []),
-
 
266
            ['version' => 'latest'],
-
 
267
            $config
-
 
268
        );
-
 
269
 
-
 
270
        $config = Arr::except($config, ['transport']);
-
 
271
 
-
 
272
        return new SesV2Transport(
-
 
273
            new SesV2Client($this->addSesCredentials($config)),
-
 
274
            $config['options'] ?? []
-
 
275
        );
-
 
276
    }
-
 
277
 
253
    /**
278
    /**
254
     * Add the SES credentials to the configuration array.
279
     * Add the SES credentials to the configuration array.
255
     *
280
     *
256
     * @param  array  $config
281
     * @param  array  $config
257
     * @return array
282
     * @return array