protected static function SearchApiElasticsearchAbstractService::escapeName in Search API Elasticsearch 7
Helper function. Escape a field or index name.
Force names to be strictly alphanumeric-plus-underscore.
1 call to SearchApiElasticsearchAbstractService::escapeName()
- SearchApiElasticsearchAbstractService::getIndexName in includes/
SearchApiElasticsearchAbstractService.inc - Helper function. Returns the elasticsearch name of an index.
File
- includes/
SearchApiElasticsearchAbstractService.inc, line 752 - Provides a Elasticsearch-based service class for the Search API.
Class
- SearchApiElasticsearchAbstractService
- Elasticsearch service abstract class.
Code
protected static function escapeName($name) {
return preg_replace('/[^A-Za-z0-9_]+/', '', $name);
}