Barefoot.DataStore.Client

This mixin contains client specific code for the Barefoot.DataStore component.

Code for deserializing a DataStore is placed here.

See also

Summary
Barefoot.DataStore.ClientThis mixin contains client specific code for the Barefoot.DataStore component.
Functions
parseTakes serialized DataStore information (most commonly created with Barefoot.DataStore.Server.toJSON) and tries to restore the described datastructure.

Functions

parse

function parse(serializedStore)

Takes serialized DataStore information (most commonly created with Barefoot.DataStore.Server.toJSON) and tries to restore the described datastructure.

Please make sure you registered all model and collection types with Barefoot.DataStore.registerModel and Barefoot.DataStore.registerCollection.  Otherwise parse will throw an error as soon as i tries to deserialize such an object.

Parameters

(Object) serializedStoreAn object contained the serialized representation of a DataStore
The DataStore is a core object and extends the Barefoot.Model.
function parse(serializedStore)
Takes serialized DataStore information (most commonly created with Barefoot.DataStore.Server.toJSON) and tries to restore the described datastructure.
function toJSON()
Serializes all models and collections of this DataStore into a plain JavaScript object.
This mixin contains client specific code for the Barefoot.DataStore component.
function registerModel(identifier,
model)
Registers a specific Barefoot.Model or Barefoot.Collection with the given identifier.
function registerCollection(identifier,
model)
An alias for registerModel.
Close