You are here

test_adapter.inc in Facet API 6.3

File

tests/facetapi_test/plugins/facetapi/test_adapter.inc
View source
<?php

/**
 * Facet API adapter for the test module.
 */
class FacetapiTestAdapter extends FacetapiAdapter {

  /**
   * The total number of results in the query.
   */
  protected $resultCount;

  /**
   * Returns a boolean flagging whether $this->searcher executed a search.
   */
  public function searchExecuted() {
    return !empty($this->keys);
  }

  /**
   * Returns a boolean flagging whether facets in a realm shoud be displayed.
   */
  public function suppressOutput($realm_name) {
  }

  /**
   * Sets the result count.
   */
  public function setResultCount($count) {
    $this->resultCount = $count;
    return $this;
  }

  /**
   * Returns the nmber of total results found for the current search.
   */
  public function getResultCount() {
    return $this->resultCount;
  }

}

Classes

Namesort descending Description
FacetapiTestAdapter Facet API adapter for the test module.