forked from fa/breadcrumb-the-shire
26 lines
586 B
PHP
26 lines
586 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace MintyPHP\Repository\Security;
|
||
|
|
|
||
|
|
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;
|
||
|
|
}
|