Typecast ​
- Type
- Final Class
- Namespace
- craft\helpers
- Inherits
- craft\helpers\Typecast
- Since
- 4.0.0
Typecast Helper
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.
Arguments ​
$class
(class-string
) – The class name$properties
(array) – The property values
Constants ​
Constant | Description |
---|---|
TYPE_ARRAY | |
TYPE_BOOL | |
TYPE_DATETIME | |
TYPE_FLOAT | |
TYPE_INT | |
TYPE_INT_FLOAT | |
TYPE_NULL | |
TYPE_STRING |