title: Get current PDO driver from existing connection?
body: <p>I have a class that accepts an existing <code>PDO</code> connection in the constructor:</p>
  
  <pre><code>class Foo {
      public function __construct(\PDO $conn = NULL) {
          // ...
      }
  
      // ...
  }
  </code></pre>
  
  <p>My question is: is there a way to determine what driver an existing <code>PDO</code> connection is currently using (preferably from the list <a href="http://www.php.net/manual/en/pdo.drivers.php">found here</a>)?  I didn't see anything in the API documentation.</p>
  
  <p>For the curious, I'd like to know which driver is being used because functionality in my class is database-specific, so I'd like a way to validate that a connection being passed to it is of the proper type.</p>