Lines Matching defs:value
28 * Escape all characters in a value.
30 * @param string $value
33 public static function escapeAll(string $value): string
35 if (self::shouldNotEscape($value)) {
36 return $value;
39 return '\\' . implode('\\', str_split(bin2hex($value), 2));
45 protected static function escapeNonPrintable(string $value): string
49 }, $value);
52 protected static function shouldNotEscape(string $value): bool
54 return (preg_match('/^(\\\\[0-9A-Fa-f]{2})+$/', $value) === 1 || $value === '');