DbZoneChangeRequestRepository
final class DbZoneChangeRequestRepository implements ZoneChangeRequestRepositoryInterface (View source)
SQL persistence for zone_change_requests, a Poweradmin-native table that is never prefixed and is shared by the SQL and API backends. Until the 4.6.0 schema update creates it, reads find nothing and writes fail.
Constants
| private COLUMNS |
|
Methods
False until the 4.6.0 schema update has created the requests table.
No description
No description
No description
No description
No description
No description
No description
Keeps a copy of the zone (a BIND zone file) taken before an approved deletion.
Pending requests per zone, for the zones that have any, counting only the requests the user may list: those in the zones they review or their own.
No description
No description
No description
No description
Cancels the zone's pending and failed requests once the zone is deleted, since a later zone can be given the same id and would inherit them.
Details
__construct(PDO $db, LoggerInterface|null $logger = null)
No description
bool
isAvailable()
False until the 4.6.0 schema update has created the requests table.
int
create(int $zoneId, string $zoneName, string $kind, int|null $requesterId, string $requesterName, string|null $requestComment, string|null $baseSerial, array $actions, string|null $zoneComment)
No description
ZoneChangeRequest|null
find(int $id)
No description
array
list(array $filters, int $offset, int $limit)
No description
int
count(array $filters)
No description
array
listPending(array|null $zoneIds, int $offset, int $limit)
No description
array
listPendingForZone(int $zoneId)
No description
int
countPending(array|null $zoneIds)
No description
void
storeSnapshot(int $id, string $snapshot)
Keeps a copy of the zone (a BIND zone file) taken before an approved deletion.
array
countPendingByZone(array $zoneIds, array|null $reviewableZoneIds, int $requesterId)
Pending requests per zone, for the zones that have any, counting only the requests the user may list: those in the zones they review or their own.
bool
markReviewed(int $id, string $status, int $reviewerId, string $reviewerName, string|null $comment, array $fromStatuses = [ZoneChangeRequest::STATUS_PENDING])
No description
void
markApplied(int $id)
No description
void
markFailed(int $id, string $error)
No description
bool
cancel(int $id)
No description
int
cancelOpenForDeletedZone(int $zoneId, string $reason)
Cancels the zone's pending and failed requests once the zone is deleted, since a later zone can be given the same id and would inherit them.