Files
breadcrumb-the-shire/core/Repository/Security/RateLimitRepositoryInterface.php

27 lines
667 B
PHP
Raw Normal View History

2026-03-05 08:26:51 +01:00
<?php
namespace MintyPHP\Repository\Security;
/** Contract for sliding-window rate limit storage by scope and subject hash. */
2026-03-05 08:26:51 +01:00
interface RateLimitRepositoryInterface
{
public function findByScopeAndHash(string $scope, string $subjectHash): ?array;
public function create(
string $scope,
string $subjectHash,
int $hits,
string $windowStartedAt,
?string $blockedUntil
): bool;
public function updateStateById(
int $id,
int $hits,
string $windowStartedAt,
?string $blockedUntil
): bool;
public function deleteByScopeAndHash(string $scope, string $subjectHash): bool;
}