Typecast
- Type
- Final Class
- Namespace
- craft\helpers
- Inherits
- craft\helpers\Typecast
- Since
- 4.0.0
Typecast Helper
View source (opens new window)
# Public Methods
Method | Description |
---|---|
properties() | Typecasts the given property values based on their type declarations. |
# properties()
Typecasts the given property values based on their type declarations.
View source (opens new window)
Arguments
$class
(string (opens new window)) – The class name$properties
(array (opens new window)) – The property values
# Constants
Constant | Description |
---|---|
TYPE_ARRAY | |
TYPE_BOOL | |
TYPE_DATETIME | |
TYPE_FLOAT | |
TYPE_INT | |
TYPE_INT_FLOAT | |
TYPE_NULL | |
TYPE_STRING |