public function filterCallbackCondition(array $data, $operator, $operands)
    {
        if (count($operands) != 1) {
            throw new InvalidParamException("Operator '$operator' requires exactly one operand.");
        }

        $callback = reset($operands);

        return array_filter($data, $callback);
    }
public function filterCallbackCondition(array $data, $operator, $operands)
    {
        if (count($operands) != 1) {
            throw new InvalidParamException("Operator '$operator' requires exactly one operand.");
        }

        $callback = reset($operands);

        return array_filter($data, $callback);
    }
public function filterCallbackCondition ( array $ data , $ operator , $ operands ) { if ( count ( $ operands ) != 1 ) { throw new InvalidParamException ( "Operator '$operator' requires exactly one operand." ) ; } $ callback = reset ( $ operands ) ; return array_filter ( $ data , $ callback ) ; }
Applies 'CALLBACK' condition.

@param array $data data to be filtered
@param string $operator operator
@param array $operands the only one operand is the PHP callback, which should be compatible with
`array_filter()` PHP function, e.g.:

```php
function ($row) {
//return bool whether row matches condition or not
}
```

@return array filtered data

@throws InvalidParamException if wrong number of operands have been given

@since 1.0.3
Applies CALLBACK condition .