]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - classes/Nonce.php
Merge branch 'master' into social-master
[quix0rs-gnu-social.git] / classes / Nonce.php
1 <?php
2 /**
3  * Table Definition for nonce
4  */
5 require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
6
7 class Nonce extends Managed_DataObject
8 {
9     ###START_AUTOCODE
10     /* the code below is auto generated do not remove the above tag */
11
12     public $__table = 'nonce';                           // table name
13     public $consumer_key;                    // varchar(255)  primary_key not_null
14     public $tok;                             // char(32)
15     public $nonce;                           // char(32)  primary_key not_null
16     public $ts;                              // datetime()  primary_key not_null
17     public $created;                         // datetime()   not_null
18     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
19
20     /* the code above is auto generated do not remove the tag below */
21     ###END_AUTOCODE
22
23     /**
24      * Compatibility hack for PHP 5.3
25      *
26      * The statusnet.links.ini entry cannot be read because "," is no longer
27      * allowed in key names when read by parse_ini_file().
28      *
29      * @return   array
30      * @access   public
31      */
32     function links()
33     {
34         return array('consumer_key,token' => 'token:consumer_key,token');
35     }
36
37     public static function schemaDef()
38     {
39         return array(
40             'description' => 'OAuth nonce record',
41             'fields' => array(
42                 'consumer_key' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'unique identifier, root URL'),
43                 'tok' => array('type' => 'char', 'length' => 32, 'description' => 'buggy old value, ignored'),
44                 'nonce' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'nonce'),
45                 'ts' => array('type' => 'datetime', 'not null' => true, 'description' => 'timestamp sent'),
46
47                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
48                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
49             ),
50             'primary key' => array('consumer_key', 'ts', 'nonce'),
51         );
52     }
53 }