ContactRequestRepositoryWp
in package
implements
ContactRequestRepository
Persist contact requests as custom WordPress posts.
Table of Contents
Interfaces
- ContactRequestRepository
- Repository interface for contact requests.
Constants
- POST_TYPE = 'webviep_contact'
Methods
- findByBooth() : array<int, ContactRequest>
- Find contact requests for a booth.
- findById() : ContactRequest|null
- Find a contact request by its domain id.
- save() : void
- Persist a contact request to WordPress.
- findPostIdByRequestId() : int
- Resolve the WordPress post ID for a contact request.
- mapPost() : ContactRequest|null
- Map a contact request post to a domain entity.
Constants
POST_TYPE
private
mixed
POST_TYPE
= 'webviep_contact'
Methods
findByBooth()
Find contact requests for a booth.
public
findByBooth(BoothId $boothId) : array<int, ContactRequest>
Parameters
- $boothId : BoothId
-
Booth identifier.
Return values
array<int, ContactRequest>findById()
Find a contact request by its domain id.
public
findById(ContactRequestId $id) : ContactRequest|null
Parameters
- $id : ContactRequestId
-
Request identifier.
Return values
ContactRequest|nullsave()
Persist a contact request to WordPress.
public
save(ContactRequest $request) : void
Parameters
- $request : ContactRequest
-
Contact request aggregate.
findPostIdByRequestId()
Resolve the WordPress post ID for a contact request.
private
findPostIdByRequestId(ContactRequestId $id) : int
Parameters
- $id : ContactRequestId
-
Request identifier.
Return values
int —WordPress post ID or 0 when not found.
mapPost()
Map a contact request post to a domain entity.
private
mapPost(WP_Post $post) : ContactRequest|null
Parameters
- $post : WP_Post
-
WordPress post representing the request.