private function _convertOptions(array $options = [])
    {
        $converted = [];
        if (!empty($options)) {
            foreach ($options as $name => $value) {
                if (is_array($value)) {
                    if (!empty($value['AND'])) {
                        $converted[$name] = implode(self::PMP_AND, $value['AND']);
                    } else if (!empty($value['OR'])) {
                        $converted[$name] = implode(self::PMP_OR, $value['OR']);
                    } else {
                        $converted[$name] = ''; // bad params
                    }
                } elseif (is_bool($value)) {
                    $converted[$name] = $value ? 'true' : 'false';
                } else {
                    $converted[$name] = $value;
                }
            }
        }
        return $converted;
    }
private function _convertOptions(array $options = [])
    {
        $converted = [];
        if (!empty($options)) {
            foreach ($options as $name => $value) {
                if (is_array($value)) {
                    if (!empty($value['AND'])) {
                        $converted[$name] = implode(self::PMP_AND, $value['AND']);
                    } else if (!empty($value['OR'])) {
                        $converted[$name] = implode(self::PMP_OR, $value['OR']);
                    } else {
                        $converted[$name] = ''; // bad params
                    }
                } elseif (is_bool($value)) {
                    $converted[$name] = $value ? 'true' : 'false';
                } else {
                    $converted[$name] = $value;
                }
            }
        }
        return $converted;
    }
private function _convertOptions ( array $ options = [ ] ) { $ converted = [ ] ; if ( ! empty ( $ options ) ) { foreach ( $ options as $ name => $ value ) { if ( is_array ( $ value ) ) { if ( ! empty ( $ value [ 'AND' ] ) ) { $ converted [ $ name ] = implode ( self :: PMP_AND , $ value [ 'AND' ] ) ; } else if ( ! empty ( $ value [ 'OR' ] ) ) { $ converted [ $ name ] = implode ( self :: PMP_OR , $ value [ 'OR' ] ) ; } else { $ converted [ $ name ] = '' ; // bad params } } elseif ( is_bool ( $ value ) ) { $ converted [ $ name ] = $ value ? 'true' : 'false' ; } else { $ converted [ $ name ] = $ value ; } } } return $ converted ; }
Converts the set of options into a compatible query string structure

Use to convert:
array('profile' => array('AND' => array('foo', 'bar')))
into:
array('profile' => 'foo,bar')

@param array $options
@return array
Converts the set of options into a compatible query string structure