1
0
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:
David Grudl
2007-11-12 07:33:23 +00:00
parent 89c53395c1
commit 46850aa588
15 changed files with 53 additions and 53 deletions

View File

@@ -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');
}