protected function SearchApiQuery::sanitizeOptions in Search API 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 SearchApiQuery::sanitizeOptions()
- SearchApiQuery::__toString in includes/
query.inc - Implements the magic __toString() method to simplify debugging.
File
- includes/
query.inc, line 874 - Contains SearchApiQueryInterface and SearchApiQuery.
Class
- SearchApiQuery
- Provides a standard implementation of the SearchApiQueryInterface.
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;
}