function NamedPlaceholderConverter::__construct

File

core/modules/mysqli/src/Driver/Database/mysqli/NamedPlaceholderConverter.php, line 89

Class

NamedPlaceholderConverter
A class to convert a SQL statement with named placeholders to positional.

Namespace

Drupal\mysqli\Driver\Database\mysqli

Code

public function __construct() {
  // Builds the combined regex pattern for parsing.
  $this->sqlPattern = sprintf('(%s)', implode('|', [
    $this->getAnsiSQLStringLiteralPattern("'"),
    $this->getAnsiSQLStringLiteralPattern('"'),
    self::BACKTICK_IDENTIFIER,
    self::BRACKET_IDENTIFIER,
    self::MULTICHAR,
    self::ONE_LINE_COMMENT,
    self::MULTI_LINE_COMMENT,
    self::OTHER,
  ]));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.