\TrackingStore
Tracker relies on an implementer of this interface to handle the actual storage and retrieval of tracking data.
Synopsis
interface TrackingStore
{
- // methods
- public void init()
- public map getProperties()
- public void setProperties()
- public void getMetadata()
- public void query()
Tasks
Line | Task |
---|---|
89+ | the following examples are not correct now that we've switched to ContextProperty as the return type. Examples: getProperties("profile.segment") might return: array( "profile.segment" => "wealthy-rural" ) getProperties(array("profile.segment", "profile.region")) might return: array( "profile.segment" => "wealth-rural", "profile.region" => "taranaki" ) (assuming that the store contains values for both properties.) getProperties( array("profile.region" => array( "multiple" => true )) ) might return: array( "profile.region" => array( "taranaki", // most recent first "manawatu", "canterbury" ) ) getProperties( array("profile.region" => array( "multiple" => true, "metadata" => true )) ) might return: array( "profile.region" => array( array( "value" => "taranaki", "timestamp" => 342423424 ), array( "value" => "manawatu", "timestamp" => 324134534 ), array( "value" => "canterbury", "timestamp" => 312532243 ) ) ) Metadata properties may vary by tracking store. The only defined key in the result item is "value". |
Methods
public
- getMetadata()
- getProperties() — Given an array of property names or ContextPropertyRequests, return a map of property->ContextProperty pairs.
- init() — Initialise the store with parameters. This is called immediately after constructing the store.
- query() — Query the tracking store.
- setProperties()