Files
predis/src/Command/Redis/ZINTERCARD.php
T
Vladyslav Vildanov 7c0cc7bdbe Extended Sorted Set support by adding ZINTERCARD command (#861)
* Refactored zinterstore, zunionstore commands and command traits

* Merge conflicts resolve, update cluster strategy test with new arguments

* Updated assertion in case if command executed faster then duration minimal threshold

* Updated Limit trait to handle integer values

* Updated Limit trait to return previous arguments if limit argument isn't set

* Added support for ZINTERCARD command

Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
2022-12-12 08:38:06 -08:00

40 lines
864 B
PHP

<?php
namespace Predis\Command\Redis;
use Predis\Command\Command as RedisCommand;
use Predis\Command\Traits\Keys;
use Predis\Command\Traits\Limit;
/**
* @link https://redis.io/commands/zintercard/
*
* This command is similar to ZINTER, but instead of returning the result set,
* it returns just the cardinality of the result.
*/
class ZINTERCARD extends RedisCommand
{
use Keys {
Keys::setArguments as setKeys;
}
use Limit {
Limit::setArguments as setLimit;
}
protected static $keysArgumentPositionOffset = 0;
protected static $limitArgumentPositionOffset = 1;
public function getId()
{
return 'ZINTERCARD';
}
public function setArguments(array $arguments)
{
$this->setLimit($arguments);
$arguments = $this->getArguments();
$this->setKeys($arguments);
}
}