1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-03 12:47:33 +02:00

DibiConnection: added config option "result|formatDate"

This commit is contained in:
David Grudl
2012-01-19 04:32:56 +01:00
parent 0f21b6ca5b
commit e4ed284e77

View File

@@ -80,6 +80,7 @@ class DibiConnection extends DibiObject
self::alias($config, 'username', 'user');
self::alias($config, 'password', 'pass');
self::alias($config, 'host', 'hostname');
self::alias($config, 'result|formatDate', 'resultDate');
self::alias($config, 'result|formatDateTime', 'resultDateTime');
if (!isset($config['driver'])) {
@@ -485,7 +486,8 @@ class DibiConnection extends DibiObject
public function createResultSet(IDibiResultDriver $resultDriver)
{
$res = new DibiResult($resultDriver);
return $res->setFormat(dibi::DATETIME, $this->config['result']['formatDateTime']);
return $res->setFormat(dibi::DATE, $this->config['result']['formatDate'])
->setFormat(dibi::DATETIME, $this->config['result']['formatDateTime']);
}