protected function _conditions($conditions, $context, array $options = []) {
		$defaults = ['prepend' => false];
		$options += $defaults;

		switch (true) {
			case empty($conditions):
				return '';
			case is_string($conditions):
				return $options['prepend'] ? $options['prepend'] . " {$conditions}" : $conditions;
			case !is_array($conditions):
				return '';
		}
		$result = [];

		foreach ($conditions as $key => $value) {
			$return = $this->_processConditions($key, $value, $context);

			if ($return) {
				$result[] = $return;
			}
		}
		$result = join(" AND ", $result);
		return ($options['prepend'] && $result) ? $options['prepend'] . " {$result}" : $result;
	}
protected function _conditions($conditions, $context, array $options = []) {
		$defaults = ['prepend' => false];
		$options += $defaults;

		switch (true) {
			case empty($conditions):
				return '';
			case is_string($conditions):
				return $options['prepend'] ? $options['prepend'] . " {$conditions}" : $conditions;
			case !is_array($conditions):
				return '';
		}
		$result = [];

		foreach ($conditions as $key => $value) {
			$return = $this->_processConditions($key, $value, $context);

			if ($return) {
				$result[] = $return;
			}
		}
		$result = join(" AND ", $result);
		return ($options['prepend'] && $result) ? $options['prepend'] . " {$result}" : $result;
	}
protected function _conditions ( $ conditions , $ context , array $ options = [ ] ) { $ defaults = [ 'prepend' => false ] ; $ options += $ defaults ; switch ( true ) { case empty ( $ conditions ) : return '' ; case is_string ( $ conditions ) : return $ options [ 'prepend' ] ? $ options [ 'prepend' ] . " {$conditions}" : $ conditions ; case ! is_array ( $ conditions ) : return '' ; } $ result = [ ] ; foreach ( $ conditions as $ key => $ value ) { $ return = $ this -> _processConditions ( $ key , $ value , $ context ) ; if ( $ return ) { $ result [ ] = $ return ; } } $ result = join ( " AND " , $ result ) ; return ( $ options [ 'prepend' ] && $ result ) ? $ options [ 'prepend' ] . " {$result}" : $ result ; }
Returns a string of formatted conditions to be inserted into the query statement.

If the query conditions are defined as an array, key pairs are converted to SQL strings.
If `$key` is numeric and `$value` is a string, `$value` is treated as a literal SQL
fragment and returned.

@param string|array $conditions The conditions for this query.
@param object $context The current `lithium\data\model\Query` instance.
@param array $options Available options are:
- `'prepend'` _boolean|string_: The string to prepend or `false`
for no prepending. Defaults to `false`.
@return string Returns an SQL conditions clause.
Returns a string of formatted conditions to be inserted into the query statement .