$attributeTypes public property
Attribute typecast map in format: attributeName => type. Type can be set via PHP callable, which accept raw value as an argument and should return typecast result. For example:
[
    'amount' => 'integer',
    'price' => 'float',
    'is_active' => 'boolean',
    'date' => function ($value) {
        return ($value instanceof \DateTime) ? $value->getTimestamp(): (int)$value;
    },
]
 If not set, attribute type map will be composed automatically from the owner validation rules.
public array $attributeTypes = null
Please login to continue.