urmaul/yii-jsonfields

This package is abandoned and no longer maintained. No replacement package was suggested.

Yii CActiveRecord behavior that allows to create array attributes which are stored in DB using json.

v1.0.0 2015-02-07 13:02 UTC

This package is not auto-updated.

Last update: 2020-01-24 15:33:30 UTC


README

Abandoned since Mysql supports json itself.

JsonFields Yii Behavior

Yii CActiveRecord behavior that allows to create array attributes which are stored in DB using json.

How to use

TODO: add comments

How to attach

public function behaviors()
{
    return array(
        array(
            'class' => 'ext.jsonfields.JsonFieldsBehavior',
            'attributes' => 'customParams',
            'arrayMode' => true,
        ),
    );
}

Settings

TODO: add comments

  • attributes
  • arrayMode