mirror of
https://github.com/dg/dibi.git
synced 2025-10-23 10:46:07 +02:00
- REWRITTEN DibiTranslar
- allows modifiers inside SQL -> modifiers become placeholders - new modifier %ex - expand array - new modifiers %or and %and - changed interface IDibiVariable and implementation DibiVariable
This commit is contained in:
@@ -29,20 +29,20 @@ class DibiVariable extends NObject implements IDibiVariable
|
||||
public $value;
|
||||
|
||||
/** @var string */
|
||||
public $type;
|
||||
public $modifier;
|
||||
|
||||
|
||||
public function __construct($value, $type)
|
||||
public function __construct($value, $modifier)
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->type = $type;
|
||||
$this->modifier = $modifier;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function toSql(IDibiDriver $driver, $modifier)
|
||||
public function toSql(DibiTranslator $translator, $modifier)
|
||||
{
|
||||
return $driver->format($this->value, $this->type);
|
||||
return $translator->formatValue($this->value, $this->modifier);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user