| Server IP : 217.160.0.212 / Your IP : 216.73.216.180 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/php/Doctrine/DBAL/Platforms/Keywords/ |
Upload File : |
<?php
namespace Doctrine\DBAL\Platforms\Keywords;
use function array_flip;
use function array_map;
use function strtoupper;
/**
* Abstract interface for a SQL reserved keyword dictionary.
*
* @psalm-consistent-constructor
*/
abstract class KeywordList
{
/** @var string[]|null */
private ?array $keywords = null;
/**
* Checks if the given word is a keyword of this dialect/vendor platform.
*
* @param string $word
*
* @return bool
*/
public function isKeyword($word)
{
if ($this->keywords === null) {
$this->initializeKeywords();
}
return isset($this->keywords[strtoupper($word)]);
}
/** @return void */
protected function initializeKeywords()
{
$this->keywords = array_flip(array_map('strtoupper', $this->getKeywords()));
}
/**
* Returns the list of keywords.
*
* @return string[]
*/
abstract protected function getKeywords();
/**
* Returns the name of this keyword list.
*
* @deprecated
*
* @return string
*/
abstract public function getName();
}