processor_ignore_case.inc 362 B

1234567891011121314151617181920
  1. <?php
  2. /**
  3. * @file
  4. * Contains SearchApiIgnoreCase.
  5. */
  6. /**
  7. * Processor for making searches case-insensitive.
  8. */
  9. class SearchApiIgnoreCase extends SearchApiAbstractProcessor {
  10. protected function process(&$value) {
  11. // We don't touch integers, NULL values or the like.
  12. if (is_string($value)) {
  13. $value = drupal_strtolower($value);
  14. }
  15. }
  16. }