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

array Transformed conditions

Source

						public function conditions($conditions, $context) {
		$schema = array();
		$model = null;

		if (!$conditions) {
			return array();
		}
		if ($code = $this->_isMongoCode($conditions)) {
			return $code;
		}
		if ($context) {
			$model = $context->model();
			$schema = $context->schema();
		}
		return $this->_conditions($conditions, $model, $schema, $context);
	}