1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 14:16:39 +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

@@ -58,8 +58,8 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
/**
* Connects to a database
*
* @throws DibiException
* @return void
* @throws DibiException
*/
public function connect(array &$config)
{
@@ -185,6 +185,7 @@ class DibiSqliteDriver 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)
{
@@ -193,7 +194,7 @@ class DibiSqliteDriver 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');
}
@@ -269,6 +270,7 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
*/
public function free()
{
$this->resultset = NULL;
}