mirror of
https://github.com/dg/dibi.git
synced 2025-08-05 21:58:10 +02:00
DibiConnection: added config option "result|formatDate"
This commit is contained in:
@@ -80,6 +80,7 @@ class DibiConnection extends DibiObject
|
|||||||
self::alias($config, 'username', 'user');
|
self::alias($config, 'username', 'user');
|
||||||
self::alias($config, 'password', 'pass');
|
self::alias($config, 'password', 'pass');
|
||||||
self::alias($config, 'host', 'hostname');
|
self::alias($config, 'host', 'hostname');
|
||||||
|
self::alias($config, 'result|formatDate', 'resultDate');
|
||||||
self::alias($config, 'result|formatDateTime', 'resultDateTime');
|
self::alias($config, 'result|formatDateTime', 'resultDateTime');
|
||||||
|
|
||||||
if (!isset($config['driver'])) {
|
if (!isset($config['driver'])) {
|
||||||
@@ -485,7 +486,8 @@ class DibiConnection extends DibiObject
|
|||||||
public function createResultSet(IDibiResultDriver $resultDriver)
|
public function createResultSet(IDibiResultDriver $resultDriver)
|
||||||
{
|
{
|
||||||
$res = new DibiResult($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']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user