getAllWheres() публичный Метод

Returns all the Where conditions to the BuilderInterface class in order to write the SQL WHERE statement.
public getAllWheres ( ) : array
Результат array
 /**
  * @param Select $select
  * @param array  $parts
  *
  * @return $this
  */
 public function writeSelectWhere(Select $select, array &$parts)
 {
     $str = '';
     $wheres = $this->writeSelectWheres($select->getAllWheres());
     $wheres = \array_filter($wheres);
     if (\count($wheres) > 0) {
         $str = 'WHERE ';
         $separator = ' ' . $this->writer->writeConjunction($select->getWhereOperator()) . ' ';
         $str .= \implode($separator, $wheres);
     }
     $parts = \array_merge($parts, [$str]);
     return $this;
 }
Пример #2
0
 /**
  * @param Select $select
  * @param array  $parts
  *
  * @return $this
  */
 public function writeSelectWhere(Select $select, array &$parts)
 {
     $str = "";
     $wheres = $this->writeSelectWheres($select->getAllWheres());
     $wheres = array_filter($wheres);
     if (count($wheres) > 0) {
         $str = "WHERE ";
         $separator = " " . $this->writer->writeConjunction($select->getWhereOperator()) . " ";
         $str .= implode($separator, $wheres);
     }
     $parts = array_merge($parts, array($str));
     return $this;
 }