protected function IgnoreCharacters::getFormatRegularExpression in Search API 8
Retrieves a regular expression for a certain Unicode character property.
Parameters
string $property: The abbreviation of the character property for which to get the regular expression.
Return value
string|null The regular expression for the property, or NULL if it could not be found.
1 call to IgnoreCharacters::getFormatRegularExpression()
- IgnoreCharacters::process in src/
Plugin/ search_api/ processor/ IgnoreCharacters.php - Processes a single string value.
File
- src/
Plugin/ search_api/ processor/ IgnoreCharacters.php, line 180
Class
- IgnoreCharacters
- Configure types of characters which should be ignored for searches.
Namespace
Drupal\search_api\Plugin\search_api\processorCode
protected function getFormatRegularExpression($property) {
$class = 'Drupal\\search_api\\Plugin\\search_api\\processor\\Resources\\' . $property;
if (class_exists($class) && in_array('Drupal\\search_api\\Plugin\\search_api\\processor\\Resources\\UnicodeCharacterPropertyInterface', class_implements($class))) {
return $class::getRegularExpression();
}
return NULL;
}