<?php

namespace Nette\Database\Table;

/**
 * @template T of ActiveRow
 * @phpstan-implements \Iterator<string, T>
 * @phpstan-implements \ArrayAccess<string, T>
 */
class Selection implements \Iterator, \ArrayAccess
{
    /**
     * @phpstan-param positive-int|0|null $limit
     * @phpstan-param positive-int|0|null $offset
     * @return static<T>
     */
    public function limit(?int $limit, ?int $offset = null)
    {
    }

    /**
     * @phpstan-param positive-int|0 $page
     * @phpstan-param positive-int|0 $itemsPerPage
     * @param int $numOfPages [optional]
     * @return static<T>
     */
    public function page(int $page, int $itemsPerPage, &$numOfPages = null)
    {
    }

    /**
     * @param string|array<string|int,mixed> $condition
     * @param mixed $params
     * @return static<T>
     */
    public function where($condition, ...$params)
    {
    }

    /**
     * @param string $column
     * @return positive-int|0
     */
    public function count($column = null)
    {
    }
}
