move connector + connection config
This commit is contained in:
parent
27faaffc4e
commit
860fe1144c
7
src/ConnectionConfig.php
Normal file
7
src/ConnectionConfig.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Amp\Sql;
|
||||||
|
|
||||||
|
interface ConnectionConfig {
|
||||||
|
public function connectionString(): string;
|
||||||
|
}
|
14
src/Connector.php
Normal file
14
src/Connector.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Amp\Sql;
|
||||||
|
|
||||||
|
use Amp\Promise;
|
||||||
|
|
||||||
|
interface Connector {
|
||||||
|
/**
|
||||||
|
* @param ConnectionConfig $config
|
||||||
|
*
|
||||||
|
* @return Promise<Connection>
|
||||||
|
*/
|
||||||
|
public function connect(ConnectionConfig $config): Promise;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user