public function __construct($provider) {
// invoke the closure/provider/factory
// so that it returns the mysqli instance
// which then gets assigned to $this->connection
$this->connection = $provider();
$sql = 'SELECT * FROM USERS WHERE ID=' ....
}