FetchModeTrait::$fetchModeLiterals

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Database/FetchModeTrait.php \Drupal\Core\Database\FetchModeTrait::fetchModeLiterals

Map FETCH_* modes to their literal for inclusion in messages.

Type: fetchModeLiterals

See also

https://github.com/php/php-src/blob/master/ext/pdo/php_pdo_driver.h#L65…

File

core/lib/Drupal/Core/Database/FetchModeTrait.php, line 15

Class

FetchModeTrait
Provide helper methods for statement fetching.

Namespace

Drupal\Core\Database

Code

protected array $fetchModeLiterals = [
    \PDO::FETCH_DEFAULT => 'FETCH_DEFAULT',
    \PDO::FETCH_LAZY => 'FETCH_LAZY',
    \PDO::FETCH_ASSOC => 'FETCH_ASSOC',
    \PDO::FETCH_NUM => 'FETCH_NUM',
    \PDO::FETCH_BOTH => 'FETCH_BOTH',
    \PDO::FETCH_OBJ => 'FETCH_OBJ',
    \PDO::FETCH_BOUND => 'FETCH_BOUND',
    \PDO::FETCH_COLUMN => 'FETCH_COLUMN',
    \PDO::FETCH_CLASS => 'FETCH_CLASS',
    \PDO::FETCH_INTO => 'FETCH_INTO',
    \PDO::FETCH_FUNC => 'FETCH_FUNC',
    \PDO::FETCH_NAMED => 'FETCH_NAMED',
    \PDO::FETCH_KEY_PAIR => 'FETCH_KEY_PAIR',
    \PDO::FETCH_CLASS | \PDO::FETCH_CLASSTYPE => 'FETCH_CLASS | FETCH_CLASSTYPE',
    \PDO::FETCH_CLASS | \PDO::FETCH_PROPS_LATE => 'FETCH_CLASS | FETCH_PROPS_LATE',
];

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