function PdoTrait::clientFetchObject
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Database/Statement/PdoTrait.php \Drupal\Core\Database\Statement\PdoTrait::clientFetchObject()
Fetches the next row and returns it as an object.
Parameters
class-string|null $class: FQCN of the class to be instantiated.
list<mixed>|null $constructorArguments: The arguments to be passed to the constructor.
Return value
object|false An instance of the required class with property names that correspond to the column names, or FALSE on failure.
Deprecated
in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement.
See also
https://www.drupal.org/node/3611848
File
-
core/
lib/ Drupal/ Core/ Database/ Statement/ PdoTrait.php, line 206
Class
- PdoTrait
- A trait for calling \PDOStatement methods.
Namespace
Drupal\Core\Database\StatementCode
protected function clientFetchObject(?string $class = NULL, array $constructorArguments = []) : object|false {
@trigger_error(__METHOD__ . '() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement. See https://www.drupal.org/node/3611848', E_USER_DEPRECATED);
if ($class) {
return $this->getClientStatement()
->fetchObject($class, $constructorArguments);
}
return $this->getClientStatement()
->fetchObject();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.