You are here

class FacetapiApachesolrAdapter in Facet API 6

Facet API adapter for the Apache Solr Search Integration module.

Hierarchy

Expanded class hierarchy of FacetapiApachesolrAdapter

1 string reference to 'FacetapiApachesolrAdapter'
facetapi_apachesolr_facetapi_adapter_info in contrib/facetapi_apachesolr/facetapi_apachesolr.module
Implementation of hook_facetapi_adapter_info().

File

contrib/facetapi_apachesolr/facetapi_apachesolr.adapter.inc, line 11
Classes used by the Facet API module.

View source
class FacetapiApachesolrAdapter extends FacetapiAdapter {

  /**
   * Returns a boolean flagging whether $this->_searcher executed a search.
   */
  public function searchExecuted() {
    return apachesolr_has_searched();
  }

  /**
   * Returns the search keys.
   */
  public function getSearchKeys() {
    if (NULL === $this->_keys) {
      if ($query = apachesolr_current_query()) {
        return $query
          ->get_query_basic();
      }
    }
    else {
      return $this->_keys;
    }
    return NULL;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FacetapiAdapter::$_facets protected property An array of FacetapiFacet objects.
FacetapiAdapter::$_keys protected property The search keys.
FacetapiAdapter::$_module protected property The module that defines the adapter.
FacetapiAdapter::$_searcher protected property The machine readable name of the searcher module.
FacetapiAdapter::$_type protected property The type of content indexed by $this->_searcher.
FacetapiAdapter::getActiveItems public function Returns a facet's active items.
FacetapiAdapter::getActiveValues public function Returns an array of the facet's active item values.
FacetapiAdapter::getFacet public function Returns an instance of FacetapiFacet for a facet.
FacetapiAdapter::getModule public function Returns the module that defines the adapter.
FacetapiAdapter::getSearcher public function Returns the searcher module.
FacetapiAdapter::getType public function Returns the type of content indexed by $this->_searcher.
FacetapiAdapter::itemActive public function Tests whether a facet item is active by passing it's value.
FacetapiAdapter::setModule public function Sets the module that defines the adapter.
FacetapiAdapter::setSearcher public function Sets the searcher module.
FacetapiAdapter::setSearchKeys public function Sets the search keys.
FacetapiAdapter::setType public function Sets the type of content indexed by $this->_searcher.
FacetapiAdapter::__construct public function Constructor, sets searcher and type of content being indexed.
FacetapiApachesolrAdapter::getSearchKeys public function Returns the search keys. Overrides FacetapiAdapter::getSearchKeys
FacetapiApachesolrAdapter::searchExecuted public function Returns a boolean flagging whether $this->_searcher executed a search. Overrides FacetapiAdapter::searchExecuted