示例#1
0
 /**
  * @param Where $where
  * @param array $whereArray
  *
  * @return array
  */
 protected function writeWhereMatches(Where $where, array &$whereArray)
 {
     $matches = [];
     foreach ($where->getMatches() as $values) {
         $columns = SyntaxFactory::createColumns($values['columns'], $where->getTable());
         $columnNames = $this->getColumnNames($columns);
         $columnValues = array(implode(" ", $values['values']));
         $columnValues = implode(", ", $this->writer->writeValues($columnValues));
         $matches[] = str_replace(['{{columnNames}}', '{{columnValues}}'], [$columnNames, $columnValues], $this->matchMode[$values['mode']]);
     }
     $whereArray = array_merge($whereArray, $matches);
 }