original_string: 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;
  	}
code: 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;
  	}
code_tokens: 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 ; }
docstring: Compile the query's where clauses.
  
  @param  array  $where
  @return array
docstring_tokens: Compile the query s where clauses .