コード例 #1
0
 /**
  * @param Where $where
  * @param array $whereArray
  *
  * @return array
  */
 protected function writeWhereComparisons(Where $where, array &$whereArray)
 {
     $comparisons = $where->getComparisons();
     array_walk($comparisons, function (&$comparison) {
         $str = $this->writeWherePartialCondition($comparison["subject"]);
         $str .= $this->writer->writeConjunction($comparison["conjunction"]);
         $str .= $this->writeWherePartialCondition($comparison["target"]);
         $comparison = "({$str})";
     });
     $whereArray = array_merge($whereArray, $comparisons);
 }
コード例 #2
0
 /**
  * @param Where $where
  * @param array $whereArray
  *
  * @return array
  */
 protected function writeWhereComparisons(Where $where, array &$whereArray)
 {
     $comparisons = $where->getComparisons();
     \array_walk($comparisons, function (&$comparison) {
         if (!is_array($comparison)) {
             return;
         }
         $str = $this->writeWherePartialCondition($comparison['subject']);
         $str .= $this->writer->writeConjunction($comparison['conjunction']);
         $str .= $this->writeWherePartialCondition($comparison['target']);
         $comparison = "({$str})";
     });
     $whereArray = \array_merge($whereArray, $comparisons);
 }