CountdownValidationHelper
in package
Read onlyYes
FinalYes
Helper class for validating countdowns
Table of Contents
Properties
Methods
- __construct() : mixed
- validateCountToDate() : void
- Validates count to date
- validateId() : void
- Validates countdown's id
- validateTitle() : void
- Validates countdown's title
Properties
$config
private
Config
$config
Methods
__construct()
public
__construct(Config $config) : mixed
Parameters
- $config : Config
validateCountToDate()
Validates count to date
public
validateCountToDate(DateTimeImmutable $countTo) : void
Preconditions
- Count to cannot be before the current date
Parameters
- $countTo : DateTimeImmutable
Tags
validateId()
Validates countdown's id
public
validateId(int $id) : void
Parameters
- $id : int
Tags
validateTitle()
Validates countdown's title
public
validateTitle(string $title) : void
Parameters
- $title : string