コード例 #1
0
ファイル: CaseExpression.php プロジェクト: rganin/magelight
 /**
  * Add when expression
  *
  * @param string|ExpressionInterface $expression
  * @param string|ExpressionInterface $thenExpression
  *
  * @return $this
  */
 public function when($expression, $thenExpression)
 {
     $this->whenThenExpressions[] = ['WHEN' => $expression, 'THEN' => $thenExpression];
     if ($expression instanceof ExpressionInterface) {
         $this->pushParams($expression->getParams());
     }
     if ($thenExpression instanceof ExpressionInterface) {
         $this->pushParams($thenExpression->getParams());
     }
     return $this;
 }
コード例 #2
0
 public function assertExpr($compiled, ExpressionInterface $expr)
 {
     $this->assertSame($compiled, $expr->compile(Mock::getMysqliDriver($this)));
 }