1
0
mirror of https://github.com/dg/dibi.git synced 2025-02-24 19:02:36 +01:00
php-dibi/dibi/libs/DibiVariable.php

49 lines
1004 B
PHP
Raw Normal View History

2008-07-17 03:51:29 +00:00
<?php
/**
* dibi - tiny'n'smart database abstraction layer
* ----------------------------------------------
*
2008-12-31 00:13:40 +00:00
* Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com)
2008-07-17 03:51:29 +00:00
*
* This source file is subject to the "dibi license" that is bundled
* with this package in the file license.txt.
*
* For more information please see http://dibiphp.com
*
2008-12-31 00:13:40 +00:00
* @copyright Copyright (c) 2005, 2009 David Grudl
2008-07-17 03:51:29 +00:00
* @license http://dibiphp.com/license dibi license
* @link http://dibiphp.com
* @package dibi
* @version $Id$
*/
/**
* Default implemenation of IDibiVariable.
* @package dibi
*/
class DibiVariable extends DibiObject implements IDibiVariable
2008-07-17 03:51:29 +00:00
{
/** @var mixed */
public $value;
/** @var string */
public $modifier;
public function __construct($value, $modifier)
{
$this->value = $value;
$this->modifier = $modifier;
}
public function toSql(DibiTranslator $translator, $modifier)
{
return $translator->formatValue($this->value, $this->modifier);
}
}