You are here

public function StatementEmpty::fetchObject in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Database/StatementEmpty.php \Drupal\Core\Database\StatementEmpty::fetchObject()

Fetches the next row and returns it as an object.

The object will be of the class specified by StatementInterface::setFetchMode() or stdClass if not specified.

phpcs:disable Drupal.Commenting @todo Remove PHPCS overrides https://www.drupal.org/node/3194677.

Parameters

string|null $class_name: Name of the created class.

array|null $constructor_arguments: Elements of this array are passed to the constructor. phpcs:enable

Return value

mixed The object of specified class or \stdClass if not specified. Returns FALSE or NULL if there is no next row.

Overrides StatementInterface::fetchObject

File

core/lib/Drupal/Core/Database/StatementEmpty.php, line 78

Class

StatementEmpty
Empty implementation of a database statement.

Namespace

Drupal\Core\Database

Code

public function fetchObject(string $class_name = NULL, array $constructor_arguments = NULL) {
  return NULL;
}