]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/YammerImport/classes/Yammer_state.php
Updating all Memcached_DataObject extended classes to Managed_DataObject
[quix0rs-gnu-social.git] / plugins / YammerImport / classes / Yammer_state.php
index 98a656bfc5aa083994ac9f738db6fd0de19d6f3f..b0f0dfabf3fdbf06dd8ec012887f21d577beab5a 100644 (file)
@@ -31,13 +31,14 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-class Yammer_state extends Memcached_DataObject
+class Yammer_state extends Managed_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 $last_error;               // text of last-encountered error, if any
     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
     public $groups_page;              // last page of groups we've fetched
     public $messages_oldest;          // oldest message ID we've fetched
@@ -53,8 +54,9 @@ 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('last_error', 'text'),
                      new ColumnDef('oauth_token', 'text'),
+                     new ColumnDef('oauth_secret', 'text'),
                      new ColumnDef('users_page', 'int'),
                      new ColumnDef('groups_page', 'int'),
                      new ColumnDef('messages_oldest', 'bigint'),
@@ -71,13 +73,13 @@ class Yammer_state extends Memcached_DataObject
      *
      * @return array array of column definitions
      */
-
     function table()
     {
         return array('id'              => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
                      'state'           => DB_DATAOBJECT_STR,
-                     'request_token'   => DB_DATAOBJECT_STR,
+                     'last_error'      => DB_DATAOBJECT_STR,
                      'oauth_token'     => DB_DATAOBJECT_STR,
+                     'oauth_secret'    => DB_DATAOBJECT_STR,
                      'users_page'      => DB_DATAOBJECT_INT,
                      'groups_page'     => DB_DATAOBJECT_INT,
                      'messages_oldest' => DB_DATAOBJECT_INT,
@@ -94,7 +96,6 @@ class Yammer_state extends Memcached_DataObject
      *
      * @return array list of key field names
      */
-
     function keys()
     {
         return array_keys($this->keyTypes());
@@ -112,7 +113,6 @@ class Yammer_state extends Memcached_DataObject
      *         'K' for primary key: for compound keys, add an entry for each component;
      *         'U' for unique keys: compound keys are not well supported here.
      */
-
     function keyTypes()
     {
         return array('id' => 'K');
@@ -128,7 +128,6 @@ class Yammer_state extends Memcached_DataObject
      *
      * @return array magic three-false array that stops auto-incrementing.
      */
-
     function sequenceKey()
     {
         return array(false, false, false);