Predis\Collection\Iterator\ListKey::__construct PHP Метод

__construct() публичный Метод

public __construct ( Predis\ClientInterface $client, string $key, integer $count = 10 )
$client Predis\ClientInterface Client connected to Redis.
$key string Redis list key.
$count integer Number of items retrieved on each fetch operation.
    public function __construct(ClientInterface $client, $key, $count = 10)
    {
        $this->requiredCommand($client, 'LRANGE');
        if (false === ($count = filter_var($count, FILTER_VALIDATE_INT)) || $count < 0) {
            throw new \InvalidArgumentException('The $count argument must be a positive integer.');
        }
        $this->client = $client;
        $this->key = $key;
        $this->count = $count;
        $this->reset();
    }