function FetchModeTrait::assocToObj

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Database/FetchModeTrait.php \Drupal\Core\Database\FetchModeTrait::assocToObj()
  2. 10 core/lib/Drupal/Core/Database/FetchModeTrait.php \Drupal\Core\Database\FetchModeTrait::assocToObj()

Converts a row of data in associative format to object.

Parameters

array $rowAssoc: A row of data in associative format.

Return value

object The row in object format.

File

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

Class

FetchModeTrait
Provide helper methods for statement fetching.

Namespace

Drupal\Core\Database

Code

protected function assocToObj(array $rowAssoc) : \stdClass {
  return (object) $rowAssoc;
}

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