You are here

protected function SearchApiAbstractProcessor::processKeys in Search API 7

Method for preprocessing search keys.

1 call to SearchApiAbstractProcessor::processKeys()
SearchApiAbstractProcessor::preprocessSearchQuery in includes/processor.inc
Calls processKeys() for the keys and processFilters() for the filters.

File

includes/processor.inc, line 348
Contains SearchApiProcessorInterface and SearchApiAbstractProcessor.

Class

SearchApiAbstractProcessor
Abstract processor implementation that provides an easy framework for only processing specific fields.

Code

protected function processKeys(&$keys) {
  if (is_array($keys)) {
    foreach ($keys as $key => &$v) {
      if (element_child($key)) {
        $this
          ->processKeys($v);
        if (!$v && !is_numeric($v)) {
          unset($keys[$key]);
        }
      }
    }
  }
  else {
    $this
      ->processKey($keys);
  }
}