Lines
n/a
0 / 0
Functions and Methods
n/a
0 / 0
Classes and Traits
n/a
0 / 0
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace BlueprintAU\Radiant\Database\Connectors; | |
| 6 | ||
| 7 | use BlueprintAU\Radiant\Database\Connections\ConnectionInterface; | |
| 8 | ||
| 9 | /** | |
| 10 | * Creates a connection from a config array. | |
| 11 | * | |
| 12 | * @see \BlueprintAU\Radiant\Database\Connections\ConnectionInterface | |
| 13 | */ | |
| 14 | interface ConnectorInterface | |
| 15 | { | |
| 16 | /** | |
| 17 | * Create a connection from the given config. | |
| 18 | * | |
| 19 | * @param array<string, mixed> $config | |
| 20 | * @return ConnectionInterface | |
| 21 | */ | |
| 22 | public function connect(array $config): ConnectionInterface; | |
| 23 | ||
| 24 | /** | |
| 25 | * Validate the shape of a connection config before it reaches | |
| 26 | * {@see connect()}. | |
| 27 | * | |
| 28 | * @param array<string,mixed> $config | |
| 29 | * @throws \InvalidArgumentException | |
| 30 | */ | |
| 31 | public function validConfig(array $config): void; | |
| 32 | } |