protected function FindReplace::getFunction in Tamper 8
Get the function to use for the find and replace.
Return value
string Function name to call.
1 call to FindReplace::getFunction()
- FindReplace::tamper in src/
Plugin/ Tamper/ FindReplace.php - Tamper data.
File
- src/
Plugin/ Tamper/ FindReplace.php, line 133
Class
- FindReplace
- Plugin implementation of the find_replace plugin.
Namespace
Drupal\tamper\Plugin\TamperCode
protected function getFunction() {
if ($this
->useRegex()) {
return 'preg_replace';
}
return $this
->getSetting(self::SETTING_CASE_SENSITIVE) ? 'str_replace' : 'str_ireplace';
}