public static function AuditFilesBatchProcess::_auditfiles_make_preg in Audit Files 8
Escapes any possible regular expression characters in the specified string.
Parameters
string $element: The string to escape.
mixed $key: The key or index for the array item passed into $element.
bool $makefilepath: Set to TRUE to change elements to file paths at the same time.
File
- src/
AuditFilesBatchProcess.php, line 73 - providing the service that used in not in
Class
- AuditFilesBatchProcess
- Process batch files.
Namespace
Drupal\auditfilesCode
public static function _auditfiles_make_preg(&$element, $key = '', $makefilepath = FALSE) {
if ($makefilepath) {
$realpath = drupal_realpath(file_build_uri($element));
if ($realpath) {
$element = $realpath;
}
}
$element = preg_quote($element);
}