moved from PDO to DatabaseConnection
Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
parent
bc50b00127
commit
e6ed2271d5
|
@ -26,7 +26,7 @@ if (php_sapi_name() !== 'cli') {
|
||||||
*/
|
*/
|
||||||
class BindAPI
|
class BindAPI
|
||||||
{
|
{
|
||||||
private PDO $dbConnection;
|
private DatabaseConnection $databaseConnection;
|
||||||
private ApiUsers $apiUsers;
|
private ApiUsers $apiUsers;
|
||||||
private DomainController $domainController;
|
private DomainController $domainController;
|
||||||
private PanelController $panelController;
|
private PanelController $panelController;
|
||||||
|
@ -35,11 +35,11 @@ class BindAPI
|
||||||
|
|
||||||
public function __construct(private array $config, private int $argc, private array $argv)
|
public function __construct(private array $config, private int $argc, private array $argv)
|
||||||
{
|
{
|
||||||
$this->dbConnection = (new DatabaseConnection(config: $this->config))->getConnection();
|
$this->databaseConnection = new DatabaseConnection(config: $this->config);
|
||||||
$this->panelController = new PanelController($this->dbConnection);
|
$this->panelController = new PanelController($this->databaseConnection);
|
||||||
$this->apiUsers = new ApiUsers($this->dbConnection);
|
$this->apiUsers = new ApiUsers($this->databaseConnection);
|
||||||
$this->domainController = new DomainController($this->dbConnection);
|
$this->domainController = new DomainController($this->databaseConnection);
|
||||||
$this->nameserverController = new NameserverController($this->dbConnection);
|
$this->nameserverController = new NameserverController($this->databaseConnection);
|
||||||
$this->checkController = new CheckController();
|
$this->checkController = new CheckController();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue