diff options
author | Brion Vibber <brion@pobox.com> | 2010-09-23 17:55:13 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-09-23 17:55:13 -0700 |
commit | bdd8a587e7b9f64fb0d3a39b851dde3f9cb562ab (patch) | |
tree | 4d4958dc83661aec9ffb9f437373c65a82c2099a /plugins/YammerImport/classes/Yammer_state.php | |
parent | dd414db9ea71ca7b2d0fca901d51931557bde6bd (diff) |
Ok, command-line workflow for YammerImportPlugin seems to mostly work, at least on tiny test site :D
Diffstat (limited to 'plugins/YammerImport/classes/Yammer_state.php')
-rw-r--r-- | plugins/YammerImport/classes/Yammer_state.php | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/plugins/YammerImport/classes/Yammer_state.php b/plugins/YammerImport/classes/Yammer_state.php index 0174ead15..2f1fd7780 100644 --- a/plugins/YammerImport/classes/Yammer_state.php +++ b/plugins/YammerImport/classes/Yammer_state.php @@ -36,7 +36,6 @@ class Yammer_state extends Memcached_DataObject public $__table = 'yammer_state'; // table name public $id; // int primary_key not_null public $state; // import state key - public $request_token; // oauth request token; clear when auth is complete. public $oauth_token; // actual oauth token! clear when import is done? public $oauth_secret; // actual oauth secret! clear when import is done? public $users_page; // last page of users we've fetched @@ -47,6 +46,23 @@ class Yammer_state extends Memcached_DataObject public $modified; // 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_state object found, or null for no hits + * + */ + + function staticGet($k, $v=null) + { + return Memcached_DataObject::staticGet('Yammer_state', $k, $v); + } + + /** * Return schema definition to set this table up in onCheckSchema */ static function schemaDef() @@ -54,7 +70,6 @@ class Yammer_state extends Memcached_DataObject return array(new ColumnDef('id', 'int', null, false, 'PRI'), new ColumnDef('state', 'text'), - new ColumnDef('request_token', 'text'), new ColumnDef('oauth_token', 'text'), new ColumnDef('oauth_secret', 'text'), new ColumnDef('users_page', 'int'), @@ -78,7 +93,6 @@ class Yammer_state extends Memcached_DataObject { return array('id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL, 'state' => DB_DATAOBJECT_STR, - 'request_token' => DB_DATAOBJECT_STR, 'oauth_token' => DB_DATAOBJECT_STR, 'oauth_secret' => DB_DATAOBJECT_STR, 'users_page' => DB_DATAOBJECT_INT, |