Hi
There isn't because nobody developed that or because it is contradicted ?
here we extends the PDO class to configure it like we want.
For example :
class ourPDO
{
public function __construct( $dsn, $user = NULL, $password = NULL,
$options = NULL )
{
$defaultOptions = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING,
PDO::ATTR_TIMEOUT => 5,
PDO::ATTR_CASE => PDO::CASE_NATURAL,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
);
if( is_array($options) )
$defaultOptions = $options + $defaultOptions;
parent::__construct($dsn, $user, $password, $defaultOptions);
}
}
and in code, we use $db = new ourPDO( ... );
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php