Class NormalizedJSONFieldsBehavior
Enables transparent serialization and storage of array objects in database fields as JSON strings.
- CComponent
- CBehavior implements IBehavior
- CModelBehavior
- CActiveRecordBehavior
- TransformedFieldStorageBehavior
- JSONFieldsBehavior
- NormalizedJSONFieldsBehavior
Direct known subclasses
JSONFieldsDefaultValuesBehavior
Package: application\components
Author: Demitri Morgan <demitri@x2engine.com>, Derek Mueller <derek@x2engine.com>
Located at x2engine/protected/components/NormalizedJSONFieldsBehavior.php
Author: Demitri Morgan <demitri@x2engine.com>, Derek Mueller <derek@x2engine.com>
Located at x2engine/protected/components/NormalizedJSONFieldsBehavior.php
public
type
|
|
public
type
|
#
packAttribute( type $name )
Normalizes the attribute array to the structure defined in |
public
type
|
#
unpackAttribute( string $name )
JSON-decodes the value stored in the database column for the attribute, and
then normalizes it to the structure defined in |
afterFind(),
afterSave(),
beforeSave(),
packAll(),
unpackAll()
|
afterDelete(),
beforeCount(),
beforeDelete(),
beforeFind(),
events()
|
afterConstruct(),
afterValidate(),
beforeValidate()
|
attach(),
detach(),
getEnabled(),
getOwner(),
setEnabled()
|
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
protected
mixed
|
$_fields |
|
|
protected
type
|
$hasOptions | true |
#
If true, specifies that the array |
public
boolean
|
$maintainCurrentFieldsOrder | false |
#
If true, when setting the JSON field, the order of the current field values
will be |
$transformAttributes
|
$owner
|
$enabled
|