for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Yiisoft\Db\Mysql;
use Yiisoft\Db\Schema\Quoter as BaseQuoter;
use Yiisoft\Db\Schema\QuoterInterface;
final class Quoter extends BaseQuoter implements QuoterInterface
{
public function __construct(
array|string $columnQuoteCharacter,
array|string $tableQuoteCharacter,
string $tablePrefix = ''
) {
parent::__construct($columnQuoteCharacter, $tableQuoteCharacter, $tablePrefix);
}
public function quoteValue(int|string $value): int|string
if (!is_string($value)) {
return $value;
return "'" . preg_replace('~[\x00\x0A\x0D\x1A\x22\x25\x27\x5C\x5F]~u', '\\\$0', $value) . "'";