rest\Serializer $preserveKeys

$preserveKeys public property (available since version 2.0.10)

Whether to preserve array keys when serializing collection data. Set this to true to allow serialization of a collection as a JSON object where array keys are used to index the model objects. The default is to serialize all collections as array, regardless of how the array is indexed.

See also serializeDataProvider().

public boolean $preserveKeys = false
doc_Yii
2016-10-30 17:11:09
Comments
Leave a Comment

Please login to continue.