@@ -37,11 +37,15 @@ class Matomo
37
37
38
38
private $ _period = self ::PERIOD_DAY ;
39
39
private $ _date = '' ;
40
+ /**
41
+ * @var int Defines the number of rows to be returned (-1: All rows).
42
+ */
43
+ private $ _filter_limit = 100 ;
40
44
private $ _rangeStart = 'yesterday ' ;
41
45
private $ _rangeEnd = null ;
42
46
private $ _isJsonDecodeAssoc = false ;
43
47
44
- private $ _limit = - 1 ;
48
+ /**
45
49
46
50
private $_errors = [];
47
51
@@ -307,24 +311,24 @@ public function setRange($rangeStart, $rangeEnd = null)
307
311
}
308
312
309
313
/**
310
- * Get the limit of returned rows
314
+ * Get the number rows which should be returned
311
315
*
312
316
* @return int
313
317
*/
314
- public function getLimit ()
318
+ public function getFilterLimit (): int
315
319
{
316
- return intval ( $ this ->_limit ) ;
320
+ return $ this ->_filter_limit ;
317
321
}
318
322
319
323
/**
320
- * Set the limit of returned rows
324
+ * Set the number of rows which should be returned
321
325
*
322
- * @param int $limit
326
+ * @param int $filterLimit
323
327
* @return $this
324
328
*/
325
- public function setLimit ( $ limit )
329
+ public function setFilterLimit ( int $ filterLimit ): Matomo
326
330
{
327
- $ this ->_limit = $ limit ;
331
+ $ this ->_filter_limit = $ filterLimit ;
328
332
329
333
return $ this ;
330
334
}
@@ -445,8 +449,8 @@ private function _parseUrl($method, array $params = [])
445
449
'period ' => $ this ->_period ,
446
450
'format ' => $ this ->_format ,
447
451
'language ' => $ this ->_language ,
448
- 'filter_limit ' => $ this ->_filter
449
- ] + $ params ;
452
+ 'filter_limit ' => $ this ->_filter_limit
453
+ ] + $ params ;
450
454
451
455
foreach ($ params as $ key => $ value ) {
452
456
$ params [$ key ] = urlencode ($ value );
0 commit comments