From b4db7c5aeecc8d15502de651c39865bd0885e42c Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 5 Dec 2023 05:37:52 +0200 Subject: [PATCH] add all possible kevaFilter attributes with default values --- src/Client.php | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/src/Client.php b/src/Client.php index 814f43d..e88db09 100644 --- a/src/Client.php +++ b/src/Client.php @@ -242,7 +242,11 @@ class Client public function kevaFilter( string $namespace, - ?string $value = '' + ?string $regexp = '', + ?int $maxage = 36000, + ?int $from = 0, + ?int $nb = 0, + ?bool $stat = false, ): mixed { $this->_id++; @@ -253,10 +257,25 @@ class Client [ 'method' => 'keva_filter', 'params' => - [ - $namespace, - $value - ], + ( + $stat? + [ + $namespace, + $regexp, + $maxage, + $from, + $nb, + 'stat' + ] + : + [ + $namespace, + $regexp, + $maxage, + $from, + $nb + ] + ), 'id' => $this->_id ] );