function StatementWrapper::__set

Implements the magic __set() method.

@todo Remove the method before Drupal 10.

See also

https://www.drupal.org/i/3210310

File

core/lib/Drupal/Core/Database/StatementWrapper.php, line 83

Class

StatementWrapper
Implementation of StatementInterface encapsulating PDOStatement.

Namespace

Drupal\Core\Database

Code

public function __set($name, $value) {
    if ($name === 'allowRowCount') {
        @trigger_error(__CLASS__ . '::$allowRowCount should not be written in drupal:9.3.0 and will error in drupal:10.0.0. Enable row counting by passing the appropriate argument to the constructor instead. See https://www.drupal.org/node/3186368', E_USER_DEPRECATED);
        $this->rowCountEnabled = $value;
    }
}

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