The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist aggregable/yii-db-typecast "@dev"
or add
"aggregable/yii-db-typecast": "@dev"
to the require section of your composer.json.
'components' => [
'db' => [
'driverMap' => ['mysql' => '\aggregable\yiidbtypecast\components\MySqlSchema'],
],
...
],
/**
* @inheritdoc
*/
public function behaviors() {
return array_merge(parent::behaviors(), [
'typecast' => [
'class' => '\aggregable\yiidbtypecast\components\ActiveRecordTypecastBehavior',
]
]);
}