/**
  * Class constructor
  *
  * @param array   $queryParams array of parameters for query
  * @param int     $action - action of search basic or advanced.
  * @param string  $memberClause if the caller wants to further restrict the search (used in memberships)
  * @param boolean $single are we dealing only with one contact?
  * @param int     $limit  how many memberships do we want returned
  *
  * @return CRM_Contact_Selector
  * @access public
  */
 function __construct(&$queryParams, $action = CRM_Core_Action::NONE, $memberClause = NULL, $single = FALSE, $limit = NULL, $context = 'search')
 {
     // submitted form values
     $this->_queryParams =& $queryParams;
     $this->_single = $single;
     $this->_limit = $limit;
     $this->_context = $context;
     $this->_memberClause = $memberClause;
     // type of selector
     $this->_action = $action;
     $this->_query = new CRM_Contact_BAO_Query($this->_queryParams, CRM_Member_BAO_Query::defaultReturnProperties(CRM_Contact_BAO_Query::MODE_MEMBER, FALSE), NULL, FALSE, FALSE, CRM_Contact_BAO_Query::MODE_MEMBER);
     $this->_query->_distinctComponentClause = " civicrm_membership.id";
     $this->_query->_groupByComponentClause = " GROUP BY civicrm_membership.id ";
 }