mirror of
https://github.com/dg/dibi.git
synced 2025-08-09 23:56:58 +02:00
* update DibiVariableInterface
* some bugs fixed
This commit is contained in:
@@ -59,8 +59,8 @@ class DibiOracleDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Connects to a database
|
||||
*
|
||||
* @throws DibiException
|
||||
* @return void
|
||||
* @throws DibiException
|
||||
*/
|
||||
public function connect(array &$config)
|
||||
{
|
||||
@@ -193,6 +193,7 @@ class DibiOracleDriver extends NObject implements DibiDriverInterface
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @return string formatted value
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function format($value, $type)
|
||||
{
|
||||
@@ -201,7 +202,7 @@ class DibiOracleDriver extends NObject implements DibiDriverInterface
|
||||
if ($type === dibi::FIELD_BOOL) return $value ? 1 : 0;
|
||||
if ($type === dibi::FIELD_DATE) return date("U", $value);
|
||||
if ($type === dibi::FIELD_DATETIME) return date("U", $value);
|
||||
throw new DibiException('Invalid formatting type');
|
||||
throw new InvalidArgumentException('Unsupported formatting type');
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user