You are here

public function SelectQueryResult::__construct in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 src/SelectQueryResult.php \Drupal\salesforce\SelectQueryResult::__construct()
  2. 5.0.x src/SelectQueryResult.php \Drupal\salesforce\SelectQueryResult::__construct()

SelectQueryResult constructor.

Parameters

array $results: The query results.

File

src/SelectQueryResult.php, line 23

Class

SelectQueryResult
Class SelectQueryResult.

Namespace

Drupal\salesforce

Code

public function __construct(array $results) {
  $this->totalSize = $results['totalSize'];
  $this->done = $results['done'];
  if (!$this->done) {
    $this->nextRecordsUrl = $results['nextRecordsUrl'];
  }
  $this->records = [];
  foreach ($results['records'] as $record) {
    $this->records[$record['Id']] = new SObject($record);
  }
}