lithium\data\source\MongoDb::conditions()
Maps incoming conditions with their corresponding MongoDB-native operators.
Parameters
-
array
$conditions
Array of conditions
-
object
$context
Context with which this method was called; currently inspects the return value of
$context->type()
.
Returns
arrayTransformed conditions
Source
public function conditions($conditions, $context) {
if (!$conditions) {
return [];
}
if ($code = $this->_isMongoCode($conditions)) {
return $code;
}
$schema = null;
$model = null;
if ($context) {
$schema = $context->schema();
$model = $context->model();
}
return $this->_conditions($conditions, $model, $schema, $context);
}