Skip to content

Commit b343211

Browse files
authored
Merge pull request #93 from craneduck/add-portal-limit-and-offset
Add _limit.portal and _offset.portal to FileMakerConnection::getRecords()
2 parents 20270ef + 0608043 commit b343211

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Services/FileMakerConnection.php

+10
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,16 @@ public function getRecords(FMBaseBuilder $query)
344344
if ($query->portal !== null) {
345345
$queryParams['portal'] = $query->portal;
346346
}
347+
if (isset($query->limitPortals) && count($query->limitPortals) > 0) {
348+
foreach ($query->limitPortals as $portalArray) {
349+
$queryParams['_limit.' . urlencode($portalArray['portalName'])] = $portalArray['limit'];
350+
}
351+
}
352+
if (isset($query->offsetPortals) && count($query->offsetPortals) > 0) {
353+
foreach ($query->offsetPortals as $portalArray) {
354+
$queryParams['_offset.' . urlencode($portalArray['portalName'])] = $portalArray['offset'];
355+
}
356+
}
347357

348358
$response = $this->makeRequest('get', $url, $queryParams);
349359

0 commit comments

Comments
 (0)