Final Class Yiisoft\Db\Mysql\Quoter
| Inheritance | Yiisoft\Db\Mysql\Quoter » Yiisoft\Db\Schema\Quoter |
|---|
Implements MySQL, MariaDB quoting and unquoting methods.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| quoteValue() | Yiisoft\Db\Mysql\Quoter |
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',
]) . "'";
}
Signup or Login in order to comment.