MySQLDump::__construct PHP Method

__construct() public method

Connects to database.
public __construct ( mysqli $connection, $charset = 'utf8' )
$connection mysqli
    public function __construct(mysqli $connection, $charset = 'utf8')
    {
        $this->connection = $connection;
        if ($connection->connect_errno) {
            throw new Exception($connection->connect_error);
        } elseif (!$connection->set_charset($charset)) {
            // was added in MySQL 5.0.7 and PHP 5.0.5, fixed in PHP 5.1.5)
            throw new Exception($connection->error);
        }
    }