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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user