1
0
mirror of https://github.com/dg/dibi.git synced 2025-10-24 03:06:07 +02:00

* added DibiTable

* new connection options: "result:objects" & "result:withtables"
* renamed DibiDriverInterface -> IDibiDriver, DibiVariableInterface -> IDibiVariable
This commit is contained in:
David Grudl
2008-01-15 03:43:03 +00:00
parent da0a239d6d
commit 5c045e58dc
21 changed files with 461 additions and 58 deletions

View File

@@ -20,26 +20,10 @@
/**
* Interface for user variable, used for generating SQL
* Default implemenation of IDibiVariable
* @package dibi
*/
interface DibiVariableInterface
{
/**
* Format for SQL
*
* @param object destination DibiDriverInterface
* @param string optional modifier
* @return string SQL code
*/
public function toSql(DibiDriverInterface $driver, $modifier);
}
class DibiVariable extends NObject implements DibiVariableInterface
class DibiVariable extends NObject implements IDibiVariable
{
/** @var mixed */
public $value;
@@ -55,7 +39,7 @@ class DibiVariable extends NObject implements DibiVariableInterface
}
public function toSql(DibiDriverInterface $driver, $modifier)
public function toSql(IDibiDriver $driver, $modifier)
{
return $driver->format($this->value, $this->type);
}