public function SelectQueryResult::__construct in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 src/SelectQueryResult.php \Drupal\salesforce\SelectQueryResult::__construct()
- 8.3 src/SelectQueryResult.php \Drupal\salesforce\SelectQueryResult::__construct()
SelectQueryResult constructor.
Parameters
array $results: The query results.
File
- src/
SelectQueryResult.php, line 46
Class
- SelectQueryResult
- Class SelectQueryResult.
Namespace
Drupal\salesforceCode
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) {
if ($sobj = SObject::createIfValid($record)) {
$this->records[$record['Id']] = $sobj;
}
}
}