0 follower

Final Class Yiisoft\Db\Mysql\Quoter

InheritanceYiisoft\Db\Mysql\Quoter » Yiisoft\Db\Schema\Quoter

Implements MySQL, MariaDB quoting and unquoting methods.

Public Methods

Hide inherited methods

Method Description Defined By
quoteValue() Yiisoft\Db\Mysql\Quoter

Method Details

Hide inherited methods

quoteValue() public method

public string quoteValue ( string $value )
$value string

                public function quoteValue(string $value): string
{
    return "'" . strtr($value, [
        '\\' => '\\\\',
        "\x00" => '\\0',
        "\n" => '\\n',
        "\r" => '\\r',
        "'" => "\'",
        '"' => '\"',
        "\x1a" => '\\Z',
    ]) . "'";
}