Pop\Db\Adapter\Mysqli::__construct PHP Метод

__construct() публичный Метод

Instantiate the MySQLi database connection object.
public __construct ( array $options ) : Mysqli
$options array
Результат Mysqli
    public function __construct(array $options)
    {
        if (!isset($options['database']) || !isset($options['host']) || !isset($options['username']) || !isset($options['password'])) {
            throw new Exception('Error: The proper database credentials were not passed.');
        }
        $this->connection = new \mysqli($options['host'], $options['username'], $options['password'], $options['database']);
        if ($this->connection->connect_error != '') {
            throw new Exception('Error: Could not connect to database. Connection Error #' . $this->connection->connect_errno . ': ' . $this->connection->connect_error);
        }
    }