aggregable / yii-db-typecast
Improve Yii DB typecast
Installs: 193
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii-component
Requires
- php: >=5.4.0
- yiisoft/yii: 1.1.*
This package is not auto-updated.
Last update: 2025-02-25 04:18:25 UTC
README
Installation
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.
Component configuration
'components' => [
'db' => [
'driverMap' => ['mysql' => '\aggregable\yiidbtypecast\components\MySqlSchema'],
],
...
],
ActiveRecord models configuration
/**
* @inheritdoc
*/
public function behaviors() {
return array_merge(parent::behaviors(), [
'typecast' => [
'class' => '\aggregable\yiidbtypecast\components\ActiveRecordTypecastBehavior',
]
]);
}