Re: Configuration in the php.ini file

From: Date: Fri, 09 Oct 2009 14:46:24 +0000
Subject: Re: Configuration in the php.ini file
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-45712@lists.php.net to get a copy of this message
And I still have to modifiy my source. ;-) In fact I'm using a personnaly Database class using PDO for add execution times and array/string transformations. Actually, I just wanted to know why there isn't any pdo propreties in the php.ini file. Pierre replied. Thanks ! Samuel. 2009/10/9 Olivier B. <php-dev.list@daevel.net>: > 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 > >

« previous php.internals (#45712) next »