<?php

declare(strict_types=1);

namespace ACP\Editing\ApplyFilter;

use AC\Request;

final class RowsPerIteration
{
    private Request $request;

    public function __construct(Request $request)
    {
        $this->request = $request;
    }

    public static function create(Request $request): self
    {
        return new self($request);
    }

    public function apply_filters(int $rows_per_iteration = 2500): int
    {
        return (int)apply_filters('acp/editing/rows_per_iteration', $rows_per_iteration, $this->request);
    }

}
