lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
final public function escapeStringForLike(string $inputString, string $escapeChar) : string
    {
        return preg_replace(
            '~([' . preg_quote($this->getLikeWildcardCharacters() . $escapeChar, '~') . '])~u',
            addcslashes($escapeChar, '\\') . '$1',
            $inputString
        );
    }
final public function escapeStringForLike(string $inputString, string $escapeChar) : string
    {
        return preg_replace(
            '~([' . preg_quote($this->getLikeWildcardCharacters() . $escapeChar, '~') . '])~u',
            addcslashes($escapeChar, '\\') . '$1',
            $inputString
        );
    }
final public function escapeStringForLike ( string $ inputString , string $ escapeChar ) : string { return preg_replace ( '~([' . preg_quote ( $ this -> getLikeWildcardCharacters ( ) . $ escapeChar , '~' ) . '])~u' , addcslashes ( $ escapeChar , '\\' ) . '$1' , $ inputString ) ; }
Escapes metacharacters in a string intended to be used with a LIKE
operator.

@param string $inputString a literal, unquoted string
@param string $escapeChar  should be reused by the caller in the LIKE
expression.
Escapes metacharacters in a string intended to be used with a LIKE operator .