protected function setArrayCriterionInQuery(QueryBuilder $query, string $column, array $criterion): void
    {
        $criterionConcat = '';
        $lastIndex       = \count($criterion) - 1;

        // Iterate through the criterion and set each item individually to be bound later
        foreach ($criterion as $index => $criterionItem) {
            $criterionConcat .= $this->columnParam($column . $index);

            // If this is not the last index, add a comma
            if ($index < $lastIndex) {
                $criterionConcat .= ',';
            }
        }

        // Set the where statement as an in
        $query->where($column . ' IN (' . $criterionConcat . ')');
    }
protected function setArrayCriterionInQuery(QueryBuilder $query, string $column, array $criterion): void
    {
        $criterionConcat = '';
        $lastIndex       = \count($criterion) - 1;

        // Iterate through the criterion and set each item individually to be bound later
        foreach ($criterion as $index => $criterionItem) {
            $criterionConcat .= $this->columnParam($column . $index);

            // If this is not the last index, add a comma
            if ($index < $lastIndex) {
                $criterionConcat .= ',';
            }
        }

        // Set the where statement as an in
        $query->where($column . ' IN (' . $criterionConcat . ')');
    }
protected function setArrayCriterionInQuery ( QueryBuilder $ query , string $ column , array $ criterion ) : void { $ criterionConcat = '' ; $ lastIndex = \ count ( $ criterion ) - 1 ; // Iterate through the criterion and set each item individually to be bound later foreach ( $ criterion as $ index => $ criterionItem ) { $ criterionConcat .= $ this -> columnParam ( $ column . $ index ) ; // If this is not the last index, add a comma if ( $ index < $ lastIndex ) { $ criterionConcat .= ',' ; } } // Set the where statement as an in $ query -> where ( $ column . ' IN (' . $ criterionConcat . ')' ) ; }
Set an array criterion in the query builder.

@param QueryBuilder $query
@param string       $column
@param array        $criterion

@return void
Set an array criterion in the query builder .