blob: 1fd4b3af4c764eaa6a44579d0e5560dd8c11bd12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Exception;
use function implode;
use function sprintf;
/** @psalm-immutable */
final class UnknownDriver extends InvalidArgumentException
{
/** @param string[] $knownDrivers */
public static function new(string $unknownDriverName, array $knownDrivers): self
{
return new self(
sprintf(
'The given driver "%s" is unknown, Doctrine currently supports only the following drivers: %s',
$unknownDriverName,
implode(', ', $knownDrivers),
),
);
}
}
|