public $json_data; // text
public $created; // datetime
+ /**
+ * Get an instance by key
+ *
+ * This is a utility method to get a single instance with a given key value.
+ *
+ * @param string $k Key to use to lookup
+ * @param mixed $v Value to lookup
+ *
+ * @return Yammer_notice_stub object found, or null for no hits
+ *
+ */
+
+ function staticGet($k, $v=null)
+ {
+ return Memcached_DataObject::staticGet('Yammer_notice_stub', $k, $v);
+ }
+
/**
* Return schema definition to set this table up in onCheckSchema
*/
return array(false, false, false);
}
+ /**
+ * Decode the stored data structure.
+ *
+ * @return mixed
+ */
+ public function getData()
+ {
+ return json_decode($this->json_data, true);
+ }
+
/**
* Save the native Yammer API representation of a message for the pending
* import. Since they come in in reverse chronological order, we need to
return $stub;
}
-
- /**
- * Save a mapping between a remote Yammer and local imported user.
- *
- * @param integer $user_id ID of the status in StatusNet
- *
- * @return Yammer_notice_stub new object for this value
- */
-
- static function retrieve($orig_id)
- {
- $stub = self::staticGet('id', $orig_id);
- if ($stub) {
- return json_decode($stub->json_data, true);
- } else {
- return false;
- }
- }
}