public static function Escaper::escapeWithSingleQuotes in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/symfony/yaml/Symfony/Component/Yaml/Escaper.php \Symfony\Component\Yaml\Escaper::escapeWithSingleQuotes()
Escapes and surrounds a PHP value with single quotes.
Parameters
string $value A PHP value:
Return value
string The quoted, escaped string
1 call to Escaper::escapeWithSingleQuotes()
- Inline::dump in vendor/
symfony/ yaml/ Inline.php - Dumps a given PHP variable to a YAML string.
File
- vendor/
symfony/ yaml/ Escaper.php, line 97
Class
- Escaper
- Escaper encapsulates escaping rules for single and double-quoted YAML strings.
Namespace
Symfony\Component\YamlCode
public static function escapeWithSingleQuotes($value) {
return sprintf("'%s'", str_replace('\'', '\'\'', $value));
}