yo no extenderia PDO, mas bien haria algo asi:
Código PHP:
<?php
class Database {
protected $link;
public function __construct($dsn, $user, $pass) {
$this->link = new PDO($dsn, $user, $pass);
}
public function query($string) {
$stmt = $this->link->prepare($string);
$stmt->execute();
return $stmt->fetchAll(PDO::FETCH_ASSOC);
}
}
//luego podrias hacer algo asi:
$db = new Database('dsn', 'user', 'pass');
//select
var_dump($db->query('select * from table'));
//insert
$db->query('insert into table values(...)');