title: Call to undefined method Closure::query()
body: <p>I have the following Closure </p>
  
  <pre><code>$dbhProvider = function (){
      //Create connection.
      $instance = new \mysqli('localhost', USERNAME, PASSWORD, 'BLOG');
      return $instance;
  };
  </code></pre>
  
  <p>And i have the following implementation</p>
  
  <pre><code>$mapper = new UserMapper($dbhProvider);
  </code></pre>
  
  <p>The <code>__constructor</code> of <code>UserMapper</code> looks like this</p>
  
  <pre><code>public function __construct($connection){
      $this-&gt;connection = $connection;
      $sql = 'SELECT * FROM USERS WHERE ID=' . $this-&gt;user-&gt;getId();
      $result = $this-&gt;connection-&gt;query($sql);
  }
  </code></pre>
  
  <p>And when i exexute i have the following error 
   <code>Call to undefined method Closure::query()</code>. How can i do the properly implement so that the <code>$this-&gt;connection</code> instance variable holds the <code>mysqli</code> connection?</p>