You are here

class FacetapiQueryTypeRange in Facet API 7

Same name and namespace in other branches
  1. 6.3 plugins/facetapi/query_type.inc \FacetapiQueryTypeRange
  2. 7.2 plugins/facetapi/query_type.inc \FacetapiQueryTypeRange

Base class for range query type plugins.

Hierarchy

Expanded class hierarchy of FacetapiQueryTypeRange

File

plugins/facetapi/query_type.inc, line 214
Interfaces and base classes for query type plugins.

View source
class FacetapiQueryTypeRange extends FacetapiQueryType {

  /**
   * Overrides FacetapiQueryType::extract().
   *
   * Adds the "start" and "end" values for the range.
   */
  public function extract(array $item) {
    $return = array();
    if (preg_match(FACETAPI_REGEX_RANGE, $item['value'], $matches)) {
      $return['start'] = $matches[1];
      $return['end'] = $matches[2];
    }
    return $return;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FacetapiQueryType::$adapter protected property The adapter associated with facet being queried.
FacetapiQueryType::$facet protected property The facet definition as returned by facetapi_facet_load().
FacetapiQueryType::getActiveItems public function Returns the facet's active items.
FacetapiQueryType::getSettings public function Convenience method to get the facet's global and per realm settings.
FacetapiQueryType::__construct public function Constructs a FacetapiQueryType object. 1
FacetapiQueryTypeRange::extract public function Overrides FacetapiQueryType::extract(). Overrides FacetapiQueryType::extract