Final Class Yiisoft\Db\Mysql\Quoter
| Inheritance | Yiisoft\ |
|---|
Implements MySQL, MariaDB quoting and unquoting methods.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| quoteValue() | Yiisoft\ |
Method Details
| public string quoteValue ( string $value ) | ||
| $value | string | |
public function quoteValue(string $value): string
{
return "'" . strtr($value, [
'\\' => '\\\\',
"\x00" => '\\0',
"\n" => '\\n' ,
"\r" => '\\r' ,
"'" => "\'",
'"' => '\"',
"\x1a" => '\\Z' ,
]) . "'";
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.