You are here

protected function SearchApiMultiQuery::sanitizeOptions in Search API Multi-Index Searches 7

Sanitizes an array of options in a way that plays nice with var_export().

Parameters

array $options: An array of options.

Return value

array The sanitized options.

1 call to SearchApiMultiQuery::sanitizeOptions()
SearchApiMultiQuery::__toString in ./search_api_multi.query.inc
Implements the magic __toString() method to simplify debugging.

File

./search_api_multi.query.inc, line 1197

Class

SearchApiMultiQuery
Standard implementation of SearchApiMultiQueryInterface.

Code

protected function sanitizeOptions(array $options) {
  foreach ($options as $key => $value) {
    if (is_object($value)) {
      $options[$key] = 'object (' . get_class($value) . ')';
    }
    elseif (is_array($value)) {
      $options[$key] = $this
        ->sanitizeOptions($value);
    }
  }
  return $options;
}