BBP_Converter_DB::__construct( string $dbuser, string $dbpassword, string $dbname, string $dbhost )
Sets up the credentials used to connect to the database server, but does not actually connect to the database on construct.
Description Description
Parameters Parameters
- $dbuser
-
(Required) MySQL database user
- $dbpassword
-
(Required) MySQL database password
- $dbname
-
(Required) MySQL database name
- $dbhost
-
(Required) MySQL database host
Source Source
File: includes/admin/classes/class-bbp-converter-db.php
public function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) { register_shutdown_function( array( $this, '__destruct' ) ); if ( WP_DEBUG && WP_DEBUG_DISPLAY ) { $this->show_errors(); } // Use ext/mysqli if it exists unless WP_USE_EXT_MYSQL is defined as true if ( function_exists( 'mysqli_connect' ) ) { $this->use_mysqli = true; if ( defined( 'WP_USE_EXT_MYSQL' ) ) { $this->use_mysqli = ! WP_USE_EXT_MYSQL; } } // Setup credentials $this->dbuser = $dbuser; $this->dbpassword = $dbpassword; $this->dbname = $dbname; $this->dbhost = $dbhost; // Normally wpdb would try to connect here, but we don't want to do that // until we are good and ready, so instead we do nothing. }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |