31 lines
741 B
PHP
31 lines
741 B
PHP
![]() |
<?php
|
||
|
/**
|
||
|
* @link http://www.yiiframework.com/
|
||
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
||
|
* @license http://www.yiiframework.com/license/
|
||
|
*/
|
||
|
|
||
|
namespace yii\db;
|
||
|
|
||
|
/**
|
||
|
* Class ExpressionBuilder builds objects of [[yii\db\Expression]] class.
|
||
|
*
|
||
|
* @author Dmitry Naumenko <d.naumenko.a@gmail.com>
|
||
|
* @since 2.0.14
|
||
|
*/
|
||
|
class ExpressionBuilder implements ExpressionBuilderInterface
|
||
|
{
|
||
|
use ExpressionBuilderTrait;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* {@inheritdoc}
|
||
|
* @param Expression|ExpressionInterface $expression the expression to be built
|
||
|
*/
|
||
|
public function build(ExpressionInterface $expression, array &$params = [])
|
||
|
{
|
||
|
$params = array_merge($params, $expression->params);
|
||
|
return $expression->__toString();
|
||
|
}
|
||
|
}
|