yii\db\Schema::quoteValue PHP Method

quoteValue() public method

Note that if the parameter is not a string, it will be returned without change.
See also: http://www.php.net/manual/en/function.PDO-quote.php
public quoteValue ( string $str ) : string
$str string string to be quoted
return string the properly quoted string
    public function quoteValue($str)
    {
        if (!is_string($str)) {
            return $str;
        }
        if (($value = $this->db->getSlavePdo()->quote($str)) !== false) {
            return $value;
        } else {
            // the driver doesn't support quote (e.g. oci)
            return "'" . addcslashes(str_replace("'", "''", $str), "\n\r\\") . "'";
        }
    }