function StatementPrefetch::__get
Implements the magic __get() method.
@todo Remove the method before Drupal 10.
See also
https://www.drupal.org/i/3210310
File
-
core/
lib/ Drupal/ Core/ Database/ StatementPrefetch.php, line 158
Class
- StatementPrefetch
- An implementation of StatementInterface that prefetches all data.
Namespace
Drupal\Core\DatabaseCode
public function __get($name) {
if ($name === 'dbh') {
@trigger_error(__CLASS__ . '::$dbh should not be accessed in drupal:9.3.0 and will error in drupal:10.0.0. Use $this->connection instead. See https://www.drupal.org/node/3186368', E_USER_DEPRECATED);
return $this->connection;
}
if ($name === 'allowRowCount') {
@trigger_error(__CLASS__ . '::$allowRowCount should not be accessed in drupal:9.3.0 and will error in drupal:10.0.0. Use $this->rowCountEnabled instead. See https://www.drupal.org/node/3186368', E_USER_DEPRECATED);
return $this->rowCountEnabled;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.