PeriodType
- Type
- Abstract Class
- Namespace
- Craft
- Inherits
- Craft\PeriodType » Craft\BaseEnum
- Since
- 2.0
The PeriodType class is an abstract class that defines the various time period lengths that are available in Craft.
This class is a poor man's version of an enum, since PHP does not have support for native enumerations.
See also http://craftcms.com
View source (opens new window)
# Public Methods
| Method | Description |
|---|---|
| getConstants() | |
| isValidName() | Checks to see if the given name is valid in the enum. |
| isValidValue() | Checks to see if the given value is valid in the enum. |
# Constants
| Constant | Description |
|---|---|
Days | |
Hours | |
Minutes | |
Months | |
Seconds | |
Weeks | |
Years |