• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/db/sqlhelper.php
  • Класс: BitrixMainDBSqlHelper
  • Вызов: SqlHelper::quote
public function quote($identifier)
{
	if (empty($this->idCache[$identifier]))
	{
		// security unshielding
		$quotedIdentifier = str_replace([$this->getLeftQuote(), $this->getRightQuote()], '', $identifier);

		// shield [[database.]tablename.]columnname
		if (str_contains($quotedIdentifier, '.'))
		{
			$quotedIdentifier = str_replace('.', $this->getRightQuote() . '.' . $this->getLeftQuote(), $quotedIdentifier);
		}

		// shield general borders
		$this->idCache[$identifier] = $this->getLeftQuote() . $quotedIdentifier . $this->getRightQuote();
	}

	return $this->idCache[$identifier];
}