Creates a new redirector repository instance.
The validator instance.
The config instance.
The logger instance.
The connector instance.
Appends a required field to the redirector.
When rendering a redirector with required fields, all specified fields must be provided in the parameters. If the fields array is empty, the redirector is 'loose' and accepts any parameters.
The ID of the campaign containing the redirector.
The redirector ID to append field to.
The field name to append to the fields list.
The campaign lock secret obtained from CampaignRepository.lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the campaign lock secret does not match.
DatabaseError If the redirector does not exist.
DatabaseError If the data validation fails.
Creates a new redirector.
The redirector is created with an empty fields array,
meaning it is initially 'loose' (accepts any parameters).
Use appendField or removeField to manage required fields.
The ID of the campaign to create the redirector in.
The new redirector ID to create.
The page template.
The campaign lock secret obtained from CampaignRepository.lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the campaign lock secret does not match.
DatabaseError If a redirector with the same ID already exists.
DatabaseError If the data validation fails.
Deletes the redirector by its ID.
A redirector cannot be deleted if it has any lures pointing to it.
The ID of the campaign containing the redirector.
The redirector ID to delete.
The campaign lock secret obtained from CampaignRepository.lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the campaign lock secret does not match.
DatabaseError If the redirector does not exist.
DatabaseError If the redirector still has lures.
DatabaseError If the data validation fails.
Lists all redirectors for the campaign.
Redirectors are ordered by creation time (oldest first).
The ID of the campaign to list redirectors for.
The array of redirector models, or null if the campaign does not exist.
DatabaseError If the data validation fails.
Lists all full redirectors for the campaign.
Redirectors are ordered by creation time (oldest first).
The ID of the campaign to list redirectors for.
The array of full redirector models, or null if the campaign does not exist.
DatabaseError If the data validation fails.
Reads the redirector by its ID.
The ID of the campaign containing the redirector.
The redirector ID to read.
The redirector model, or null if the redirector is not found.
DatabaseError If the data validation fails.
Reads the full redirector by its ID.
The ID of the campaign containing the redirector.
The redirector ID to read.
The full redirector model, or null if the redirector is not found.
DatabaseError If the data validation fails.
Removes a required field from the redirector.
The ID of the campaign containing the redirector.
The redirector ID to remove field from.
The field name to remove from the fields list.
The campaign lock secret obtained from CampaignRepository.lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the campaign lock secret does not match.
DatabaseError If the redirector does not exist.
DatabaseError If the data validation fails.
Updates the redirector specific fields.
All update parameters are optional. Only provided fields will be updated.
The ID of the campaign containing the redirector.
The redirector ID to update.
The page template.
The campaign lock secret obtained from CampaignRepository.lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the campaign lock secret does not match.
DatabaseError If the redirector does not exist.
DatabaseError If the data validation fails.
StaticregisterRegisters the redirector repository as a singleton in the DI container.
The DI container to register in.
Redis-based redirector repository implementation.
Depends:
Example