private function filter(array $containerData, array $whereExpression, array $withCondition)
    {
        $data = array_filter($containerData, function ($item) use ($whereExpression, $withCondition) {
            foreach ($item as $field => $value) {
                if (!$this->arrayFilter($value, $field, $whereExpression, $withCondition)) {
                    return false;
                }
            }
    
            return true;
        });

        if ($this->_order !== null) {
            ArrayHelper::multisort($data, $this->_order['keys'], $this->_order['directions']);
        }
    
        if ($this->_offset !== null) {
            $data = array_slice($data, $this->_offset, null, true);
        }
    
        if ($this->_limit !== null) {
            $data = array_slice($data, 0, $this->_limit, true);
        }
        
        return $data;
    }
private function filter(array $containerData, array $whereExpression, array $withCondition)
    {
        $data = array_filter($containerData, function ($item) use ($whereExpression, $withCondition) {
            foreach ($item as $field => $value) {
                if (!$this->arrayFilter($value, $field, $whereExpression, $withCondition)) {
                    return false;
                }
            }
    
            return true;
        });

        if ($this->_order !== null) {
            ArrayHelper::multisort($data, $this->_order['keys'], $this->_order['directions']);
        }
    
        if ($this->_offset !== null) {
            $data = array_slice($data, $this->_offset, null, true);
        }
    
        if ($this->_limit !== null) {
            $data = array_slice($data, 0, $this->_limit, true);
        }
        
        return $data;
    }
private function filter ( array $ containerData , array $ whereExpression , array $ withCondition ) { $ data = array_filter ( $ containerData , function ( $ item ) use ( $ whereExpression , $ withCondition ) { foreach ( $ item as $ field => $ value ) { if ( ! $ this -> arrayFilter ( $ value , $ field , $ whereExpression , $ withCondition ) ) { return false ; } } return true ; } ) ; if ( $ this -> _order !== null ) { ArrayHelper :: multisort ( $ data , $ this -> _order [ 'keys' ] , $ this -> _order [ 'directions' ] ) ; } if ( $ this -> _offset !== null ) { $ data = array_slice ( $ data , $ this -> _offset , null , true ) ; } if ( $ this -> _limit !== null ) { $ data = array_slice ( $ data , 0 , $ this -> _limit , true ) ; } return $ data ; }
Filtering data based on a where expression.

@param array $containerData The data to filter from
@param array $whereExpression An array with `[['op' => '=', 'field' => 'fieldName', 'value' => 'comparevalue'],[]]`
@param array $withCondition An array with with conditions `$with['hidden']`.
@return array
Filtering data based on a where expression .