protected function compileWhereBasic($where)
	{
		extract($where);

		// Replace like with MongoRegex
		if ($operator == 'like') {
			$operator = '=';
			$regex    = str_replace('%', '', $value);

			// Prepare regex
			if (substr($value, 0, 1) != '%')
				$regex = '^' . $regex;
			if (substr($value, -1) != '%')
				$regex = $regex . '$';

			$value = array('$regex' => "$regex");
		}

		if (!isset($operator) || $operator == '=')
		{
			$query = array(
				$column => $value
			);
		}
		elseif (array_key_exists($operator, $this->conversion))
		{
			$query = array(
				$column => array(
					$this->conversion[$operator] => $value
				)
			);
		}
		else
		{
			$query = array(
				$column => array(
					'$' . $operator => $value
				)
			);
		}

		return $query;
	}
protected function compileWhereBasic($where)
	{
		extract($where);

		// Replace like with MongoRegex
		if ($operator == 'like') {
			$operator = '=';
			$regex    = str_replace('%', '', $value);

			// Prepare regex
			if (substr($value, 0, 1) != '%')
				$regex = '^' . $regex;
			if (substr($value, -1) != '%')
				$regex = $regex . '$';

			$value = array('$regex' => "$regex");
		}

		if (!isset($operator) || $operator == '=')
		{
			$query = array(
				$column => $value
			);
		}
		elseif (array_key_exists($operator, $this->conversion))
		{
			$query = array(
				$column => array(
					$this->conversion[$operator] => $value
				)
			);
		}
		else
		{
			$query = array(
				$column => array(
					'$' . $operator => $value
				)
			);
		}

		return $query;
	}
protected function compileWhereBasic ( $ where ) { extract ( $ where ) ; // Replace like with MongoRegex if ( $ operator == 'like' ) { $ operator = '=' ; $ regex = str_replace ( '%' , '' , $ value ) ; // Prepare regex if ( substr ( $ value , 0 , 1 ) != '%' ) $ regex = '^' . $ regex ; if ( substr ( $ value , - 1 ) != '%' ) $ regex = $ regex . '$' ; $ value = array ( '$regex' => "$regex" ) ; } if ( ! isset ( $ operator ) || $ operator == '=' ) { $ query = array ( $ column => $ value ) ; } elseif ( array_key_exists ( $ operator , $ this -> conversion ) ) { $ query = array ( $ column => array ( $ this -> conversion [ $ operator ] => $ value ) ) ; } else { $ query = array ( $ column => array ( '$' . $ operator => $ value ) ) ; } return $ query ; }
Compile the query's where clauses.

@param  array  $where
@return array
Compile the query s where clauses .