Cody Cook
70c8a87e15
All checks were successful
SonarQube Scan / SonarQube Trigger (push) Successful in 30s
17 lines
492 B
PHP
17 lines
492 B
PHP
<?php
|
|
|
|
namespace DJMixHosting;
|
|
|
|
// create a class that extends mysql database
|
|
use mysqli;
|
|
|
|
class Database extends mysqli
|
|
{
|
|
// create a constructor that takes in the config file
|
|
public function __construct($config)
|
|
{
|
|
// call the parent constructor with the config file
|
|
parent::__construct($config['database']['host'], $config['database']['user'], $config['database']['pass'], $config['database']['db'], $config['database']['port'] ?? 3306);
|
|
}
|
|
}
|