Skip to content

Commit c647472

Browse files
committed
Adjust search function in SoftoneBrowser to handle -1 limit for fetching all data.
1 parent 882216d commit c647472

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

src/SoftoneBrowser.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,25 @@ class SoftoneBrowser extends Softone
77
{
88

99
/**
10+
* @param $object
11+
* @param string $filters
12+
* @param string $list
13+
* @param $start
14+
* @param $limit
15+
* @return void
1016
* @throws \Exception
17+
*
18+
* Set limit to -1, it will get all the data
19+
*
1120
*/
12-
public function search($object, $filters='', $list='', $start='',$limit='' ): void
21+
public function search($object, string $filters='', string $list='', $start='', $limit='' ): void
1322
{
1423
$this->getBrowserInfo($object, $filters, $list);
24+
25+
if ($limit==-1){
26+
$limit = $this->response->totalcount;
27+
}
28+
1529
$this->getBrowserData($start, $limit);
1630
}
1731

0 commit comments

Comments
 (0)