Behavior: Transform Values Of Attributes ​​In Read-Write

Behavior for CActiveRecord https://github.com/Yannn/transform-attributes-behavior .

Can convert the value of the specified attributes models when writing to DB and back.

In the simplest case before writing the value is converted to JSON, respectively, on the contrary after reading is restored from JSON.

Can be assigned individually conversion function to a specific attribute before and after recording.

For example, you can store object in the attribute, before recording you can pull out the data and write it into JSON, after reading to create object and restore data .

I will be glad to hear comments and suggestions.