interface RecordCommentRepositoryInterface (View source)

Persistence for RRset-level record comments; both backends implement it.

Per-record links are RecordLinkedCommentRepositoryInterface (SQL only).

Methods

add(RecordComment $comment)

Add a new comment to the database.

bool
delete(int $domainId, string $name, string $type)

Delete all comments for an RRset (domain_id, name, type).

bool
deleteLegacyComment(int $domainId, string $name, string $type)

Delete only legacy RRset comments (no per-record links).

void
deleteByDomainId(int $domainId)

Delete all comments for a domain.

find(int $domainId, string $name, string $type)

Find a comment by RRset (domain_id, name, type).

update(int $domainId, string $oldName, string $oldType, RecordComment $comment)

Update an existing comment or create a new one.

addForRecord(int|string $recordId, RecordComment $comment)

Add a comment for a specific record.

Details

RecordComment add(RecordComment $comment)

Add a new comment to the database.

Parameters

RecordComment $comment

The comment to add

Return Value

RecordComment

The added comment with ID

bool delete(int $domainId, string $name, string $type)

Delete all comments for an RRset (domain_id, name, type).

Parameters

int $domainId

Domain ID

string $name

Record name

string $type

Record type

Return Value

bool

bool deleteLegacyComment(int $domainId, string $name, string $type)

Delete only legacy RRset comments (no per-record links).

Parameters

int $domainId

Domain ID

string $name

Record name

string $type

Record type

Return Value

bool

void deleteByDomainId(int $domainId)

Delete all comments for a domain.

Parameters

int $domainId

Domain ID

Return Value

void

RecordComment|null find(int $domainId, string $name, string $type)

Find a comment by RRset (domain_id, name, type).

Returns the first matching comment.

Parameters

int $domainId

Domain ID

string $name

Record name

string $type

Record type

Return Value

RecordComment|null

RecordComment|null update(int $domainId, string $oldName, string $oldType, RecordComment $comment)

Update an existing comment or create a new one.

Parameters

int $domainId

Domain ID

string $oldName

Previous record name

string $oldType

Previous record type

RecordComment $comment

The updated comment

Return Value

RecordComment|null

RecordComment|null addForRecord(int|string $recordId, RecordComment $comment)

Add a comment for a specific record.

Creates the comment and links it to the record.

Parameters

int|string $recordId

The record ID

RecordComment $comment

The comment to add

Return Value

RecordComment|null

The added comment with ID, or null on failure